The requested URL /Codeigniter/upload/do_upload was not found on this server |
[eluser]Zombie1[/eluser]
Hello everyone, I've just started using Codeigniter today. I've managed to install Codeigniter but I'm having a bit of trouble with one of the tutorials, (the File uploading class tutorial). The upload_form works fine. It allows me to upload an image, however, when I press the upload button I'm presented with an error message stating: Not Found The requested URL /Codeigniter/upload/do_upload was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. I've noticed the folder Codeigniter does not have a folder named 'upload' inside it it also does not have a do_upload. When I create a folder called 'upload' and 'do_upload' I'm presented with this error message: Index of /Codeigniter/upload/do_upload [ICO] Name Last modified Size Description [DIR] Parent Directory and there's no file uploaded inside the uploads folder in the root directory as mentioned in the tutorial. Can anyone help?
[eluser]treenef[/eluser]
It's not a folder it is a method within a controller. The controller might be called upload and the method is do_upload
[eluser]Zombie1[/eluser]
Thanks, But how do I get Codeigniter to recognise the upload and do_upload?
[eluser]treenef[/eluser]
Create a controller called 'Upload.php' Then create a method public function do_upload(). Inside that function paste the code for uploading a file from the user guide.
[eluser]CroNiX[/eluser]
What is your "base_url" and "index_page" set to in your config? Are you using an htaccess?
[eluser]www.sblog.in[/eluser]
example http://www.webtuts.in/file-upload-exampl...ter-2-1-4/ |
Welcome Guest, Not a member yet? Register Sign In |