![]() |
uploading picture - 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 picture (/showthread.php?tid=65899) Pages:
1
2
|
uploading picture - davy_yg - 08-07-2016 I need someone to help me fix this error message: 404 Page Not Found The page you requested was not found. After uploading picture and press upload it carries me to this : views/addslideshows.php PHP Code: <td> controllers/cuploadfile.php PHP Code: function upload() Can anyone help me figure this thing out? RE: uploading picture - davy_yg - 08-18-2016 I add this to routes. Can anyone help me fix this error message: routes.php PHP Code: $route['cuploadfile/upload_galleries/addslideshows'] = 'cloadfile/upload_galleries'; RE: uploading picture - Fallebdi - 08-22-2016 hello, must use it into a form , you put it without form and direction for the action after submission. read a documentation about upload library . RE: uploading picture - wolfgang1983 - 08-22-2016 (08-18-2016, 08:31 PM)davy_yg Wrote: I add this to routes. Can anyone help me fix this error message: I do not see and form multipart any where use form helper http://www.codeigniter.com/user_guide/helpers/form_helper.html#form_open_multipart On controller __construct area load helper or autoload it and then on view echo form_open_multipart('controller/function') echo form_close() Note: Make sure you set your base url. RE: uploading picture - davy_yg - 08-28-2016 I wonder why this error still appears: http://127.0.0.1/CompanyGiondaCI/index.php/Cuploadfile/upload 404 Page Not Found The page you requested was not found. ------------------------------------------------------------------ config/config.php PHP Code: $config['base_url'] = 'http://127.0.0.1/CompanyGiondaCI'; views/addslideshows.php PHP Code: <legend>CodeIgniter File Upload Demo</legend><br> controllers/Cuploadfile.php PHP Code: <?php RE: uploading picture - ciadmin - 08-28-2016 Your "bad" link (http://127.0.0.1/CompanyGiondaCI/index.php/Cuploadfile/upload) refers to "Cuploadfile", not to "uploadfile". Where does the extra "C" come from? Why didn't you notice this? RE: uploading picture - davy_yg - 08-29-2016 404 Page Not Found The page you requested was not found. controllers/Cuploadfile.php PHP Code: //file upload function config/routes.php PHP Code: $route['Cuploadfile/upload'] = 'Cuploadfile/upload'; RE: uploading picture - salain - 08-29-2016 Obviously you will get 404 errors: your form : PHP Code: echo form_open_multipart('uploadfile/upload'); Your controller: controllers/Cuploadfile.php Your route (pointless code anyway and wrong): PHP Code: $route['cuploadfile/upload_galleries/addslideshows'] = 'cloadfile/upload_galleries'; Remove the route. change the form_open.. to point to the controller/method 'cuploadfile/upload' That should get you on the right path. Also do yourself (and everyone else here) a favour: Do these in order: Learn English Learn to listen Learn Logic Learn PHP Learn MySQL Then come back RE: uploading picture - InsiteFX - 08-29-2016 He's also missing the ending slash on the config base_url This is also wrong: PHP Code: $config['upload_path'] = 'uploads/'; Should be: PHP Code: $config['upload_path'] = './uploads/'; RE: uploading picture - davy_yg - 08-30-2016 Okay, I change something: config/config.php PHP Code: $config['base_url'] = 'http://127.0.0.1/CompanyGiondaCI/'; controllers/Cuploadfile.php PHP Code: //file upload function I still receiving this error messages: 404 Page Not Found The page you requested was not found. |