Jump to content
Larry Ullman's Book Forums
Sign in to follow this  
Chris-M

Chapter 10 Script 10.3 Upload_Image - Image Only Goes To Website 'htdocs' Folder On

Recommended Posts

Hi,

 

In chapter 10,script 10.3 Upload_Image. I get the message The file has been uploaded! even when I can't see the file in the 'uploads' folder I added to the website.

 

If I replace ../uploads/ with ../htdocs/ in the script the image appears in the website 'htdocs' folder - great, at least the script is working as expected there.

 

I can create folders alongside the htdocs one in my webspace but I can't change the properties of them - although they all seem to have the same (htdocs and uploads for example).

 

My web host is Fasthosts.

 

I see on the forum there have been similar questions, but with no conclusions.

 

I suspect this is more of a web host issue than a php one, but it would be nice to know for sure and if there is a way round it.

 

Thanks.

 

Chris

Share this post


Link to post
Share on other sites

The reason there are no conclusions on this issue is that everyone's setup is different. Replacing ../uploads/ with ../htdocs/, for example, makes absolutely no sense unless you've done something different with your paths. I would start by picking one approach and going with it. I would either try to use the "uploads" folder OUTSIDE of the web root or create one WITHIN the web root. Then you'd need to set the upload path to point to it accordingly. 

 

PHP would not give the message that the file was uploaded unless it was uploaded. So something else may be going on. I'd make sure display_errors is enabled and that your code is pointing to the right destination directory. 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...