Welcome Guest, Not a member yet? Register   Sign In
Image Upload
#2

(This post was last modified: 05-11-2016, 01:23 AM by PaulD. Edit Reason: Added PS )

PHP is usually very good in it's error reporting. Here it is telling you that the path you are trying to upload your image to is invalid. The path you have used is "uploads/" but perhaps you meant to use "./uploads/" however it depends where you put the uploads folder in the first place.

Alternatively you can use an absolute server path something like "/sites/mydomain/public/uploads/" but the actual path will depend on your server set up.

This is well described in the documentation
http://www.codeigniter.com/user_guide/li...references

PS In general, reading the documentation, using php.net and google searches and working through these problems is a great way to learn, but you have to have an interest in learning why something has gone wrong and what the solution actually means, how it actually is working or solving an error. It is in solving these small problems that we learn about bigger issues, and become better programmers. For instance, these path problems can be solved with a bit of experimentation, moving the target folder, tracing where it is trying to look, testing to see if you can find it where it is looking, trying an absolute path, reading your hosts server path documentation, running a test script etc etc etc. After just an hour or two you will be thoroughly versed in the subject. Also, don't forget there are lots of great books on php available too, and working through a well written book is time well invested, as the writer will guide you from simple to more complex things in a controlled and thoughtful manner.

Hope that helps.
Reply


Messages In This Thread
Image Upload - by davy_yg - 05-10-2016, 11:30 PM
RE: Image Upload - by PaulD - 05-11-2016, 01:12 AM



Theme © iAndrew 2016 - Forum software by © MyBB