![]() |
Uploading File - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Uploading File (/showthread.php?tid=65727) |
Uploading File - davy_yg - 07-16-2016 Hello, I am trying to upload some file but have not been successful yet doing this. This my upload CI codes. My target extension is JPG/GIF controllers/uploadfile.php PHP Code: <?php views/upload_file_view.php PHP Code: <!DOCTYPE html> This is the view: CodeIgniter File Upload Demo Select File to Upload [ Browse ] The upload path does not appear to be valid. [ Upload File ] When I try to upload JPG/GIF nothing happens, it only loads nothing. With this error message: The upload path does not appear to be valid. ---------------------------------- controllers/uploadfile.php PHP Code: function upload() controllers/uploads/ (uploads folder address) How to fix the error? RE: Uploading File - ciadmin - 07-16-2016 If you use a relative upload file path, as you have, it is relative to the location of your index.php front controller. That means that the library will be looking for PROJECT/uploads with your configuration, and *not* for PROJECT/application/controllers/uploads. |