943,970 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 4668
  • PHP RSS
Jan 26th, 2007
0

File doesn't upload into the directory I specified. Need help!

Expand Post »
I've been testing on uploading files and I encountered a weird bug while testing it out because on the initial uploading of the file, my localhost uploads it to the root directory of my xampp rather than in the directory inside my htdocs folder. To make things clear here's what happened.

1.) I upload my file from a page in http://localhost/fileupload/upload.html, which is equivalent to my "C:\xampp\htdocs\fileupload" directory.

3) After the initial upload the file is stored in the "C:\xampp" folder instead of the fileupload folder mentioned above.

4) I tried uploading again, that's when it stores the uploaded files to my uploaded folder.

5) When I deleted the copy on the "C:\xampp" folder and uploaded the file again, it's there again and it didn't replace the copy on the "C:\xampp\htdocs\fileupload" directory.

From this, I deduced that if it doesn't see a copy of a file in the "C:\xampp" directory, the upload goes there. If the file exists, that's the only time it uploads it to the same directory as my page. Is this a config issue or a security issue? Can anyone shed some light on this matter?

Thanks,

Joni
Last edited by jblacdao; Jan 26th, 2007 at 12:14 am. Reason: title missing one word XD
Similar Threads
Reputation Points: 12
Solved Threads: 3
Light Poster
jblacdao is offline Offline
37 posts
since Jan 2007
Jan 26th, 2007
0

Re: File doesn't upload into the directory I specified. Need help!

Might be the current working directory issue. Try specifying absolute path when copying the uploaded file.
Reputation Points: 13
Solved Threads: 2
Junior Poster
php_daemon is offline Offline
138 posts
since Aug 2006
Jan 30th, 2007
0

Re: File doesn't upload into the directory I specified. Need help!

hai jblacdao
Sorry I am not clear what u mentioned ur mail
Can u please expline again clearly
Reputation Points: 5
Solved Threads: 5
Junior Poster
vssp is offline Offline
197 posts
since Jul 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: watermark png no resize
Next Thread in PHP Forum Timeline: PHP Problem





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC