Integrate uploadify with codeigniter
Tech-Today

Integrate uploadify with codeigniter


Googling around I've found several solutions, but not to my liking some even suggest to edit the fla. Well there's no problem with that if you want to.

The problem with the uploadify.swf is that if uploads the file relative to the .swf location.

So I've come up with a simple yet effective solution.

1.) Open the uploadify.php

//normally it should be like this:
$targetPath = $_SERVER['DOCUMENT_ROOT'] . $_REQUEST['folder'] . '/';
$targetFile = str_replace('//','/',$targetPath) . $_FILES['Filedata']['name'];
$targetFile = $_REQUEST["folder"] . $_FILES['Filedata']['name'];

//just change it to:
$targetFile = getcwd();


Or set $targetFile to any directory of your liking.




- Uploadify Dynamic File Extension
Requirement: To change the file extension depending on the value of a dropdown box. The code will explain how this can be achieve. <script type="text/javascript"> $(document).ready(function() { var fileExt = ""; var fileDesc = ""; var leftSelected...

- Uploadify Check Script Not Working
To setup uploadify see the previous post: Uploadify Setup To add a check script add the following config: $('#custom_file_upload').uploadify({ ... 'checkScript' : "uploadifycheck.php", } Where uploadifycheck should contain the lines:...

- Setting Up Eclipse, Subclipse And Visual Svn Server
If you are tired of the usual copy all, zip backup your application files then I suggest you try using SVN. But let me clarrify, SVN is not a backup management tool. Instead it's a way of properly tagging each file, fix/update wherein you can put...

- Allowing Url Query String In Codeigniter
As we all know codeigniter uses segment-based as url, example: Just like these: classname/methodname/parameter1/paramenter2, index.php/index/login/user/password Unfortunately, I was developing a web application that would accept payments via paypal. And...

- How To Create A New Index Inside A Subdirectory In Codeigniter
I am using codeigniter framework in my php project and I have a requirement like this: When the url is */admin/, the application should call the index.php inside the admin folder. Folder structure: +codeigniter app +application +controller +index.php...



Tech-Today








.