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

Reply

Join Date: Jan 2007
Posts: 37
Reputation: jblacdao is an unknown quantity at this point 
Solved Threads: 3
jblacdao jblacdao is offline Offline
Light Poster

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

 
0
  #1
Jan 26th, 2007
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
Reply With Quote Quick reply to this message  
Join Date: Aug 2006
Posts: 138
Reputation: php_daemon is an unknown quantity at this point 
Solved Threads: 2
php_daemon php_daemon is offline Offline
Junior Poster

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

 
0
  #2
Jan 26th, 2007
Might be the current working directory issue. Try specifying absolute path when copying the uploaded file.
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 197
Reputation: vssp has a little shameless behaviour in the past 
Solved Threads: 5
vssp vssp is offline Offline
Junior Poster

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

 
0
  #3
Jan 30th, 2007
hai jblacdao
Sorry I am not clear what u mentioned ur mail
Can u please expline again clearly
Thanks
VSSP
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC