Jump to content
Larry Ullman's Book Forums

add_pdf.php move_uploaded_file()


Recommended Posts

Hey Larry - it's my understanding that this error relates to the location of my web root directory? Thanks

An error occurred in script '/Users/saphiakharaz/Sites/html/add_pdf.php' on line 37:
move_uploaded_file(/~saphiakharaz/ecom1/html/pdfs/d19915d2209b4ead4a9cfc8cf246f7bc458dd8365d39f7e0081947.22694525_tmp): failed to open stream: No such file or directory

Link to comment
Share on other sites

Well, the error means that it cannot find the named file or directory, which either means the file or directory doesn't exist OR the file or directory path provided is wrong. Here it's the latter. Note that you start with 

/~saphiakhara

That's probably wrong. In Unix, the tilde refers to the current user's home directory. So ~ in this case equals /Users/saphiakharaz. You have "/~saphiakhara" which is incorrect in a couple of ways. "~/ecom1/..." would be more correct  but you should probably use the full, absolute path  ("/Users/saphia...") instead. 

Link to comment
Share on other sites

 Share

×
×
  • Create New...