Welcome Guest, Not a member yet? Register   Sign In
The requested URL /Codeigniter/upload/do_upload was not found on this server
#1

[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?
#2

[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

#3

[eluser]Zombie1[/eluser]
Thanks,

But how do I get Codeigniter to recognise the upload and do_upload?
#4

[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.
#5

[eluser]CroNiX[/eluser]
What is your "base_url" and "index_page" set to in your config? Are you using an htaccess?
#6

[eluser]www.sblog.in[/eluser]
example http://www.webtuts.in/file-upload-exampl...ter-2-1-4/




Theme © iAndrew 2016 - Forum software by © MyBB