cannot upload files to server - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: cannot upload files to server (/showthread.php?tid=60420) |
cannot upload files to server - El Forum - 03-23-2014 [eluser]vimeo[/eluser] I have a basic knowledge on codeigniter. I want upload a file and save it .I used the following code but it's not working properly. can anyone please explain how to do it properly? controller Code: public function doUpload() cannot upload files to server - El Forum - 03-23-2014 [eluser]vimeo[/eluser] I think the problem is with the path.But i can't figure it out. I've been going through codes for days. any help would be appreciated. cannot upload files to server - El Forum - 03-23-2014 [eluser]jonez[/eluser] What error message do you get? cannot upload files to server - El Forum - 03-23-2014 [eluser]Tpojka[/eluser] (Not just) as beginner you should use basic example provided in user guide. Works perfectly. cannot upload files to server - El Forum - 03-24-2014 [eluser]vimeo[/eluser] [quote author="jonez" date="1395577851"]What error message do you get?[/quote] Code: success page Severity: Notice Message: Undefined variable: upload_data Filename: views/success.php Line Number: 14 A PHP Error was encountered Severity: Warning Message: Invalid argument supplied for foreach() Filename: views/success.php Line Number: 14 cannot upload files to server - El Forum - 03-24-2014 [eluser]Tpojka[/eluser] So, you are trying to upload more than one file. For that achievment you should use some extensions to CI default upload library. Try with this one. cannot upload files to server - El Forum - 05-15-2014 [eluser]vimeo[/eluser] solved it. However I had to change 'upload path ' to $config['upload_path']='images/'; Thanks everyone for suggestions. |