ID: 10835 Updated by: derick Reported By: [EMAIL PROTECTED] Old-Status: Open Status: Feedback Bug Type: FTP related Operating system: PHP Version: 4.0.5 Assigned To: Comments: Hello, can you try if this has anything to do with spaces in filenames? (so try "C:\\Te st.doc"). If that's the case you need to escape your filename like this: $b = strreplace (" ", "\ ", $b); Previous Comments: --------------------------------------------------------------------------- [2001-05-12 19:45:22] [EMAIL PROTECTED] an example: $file = C:\whatever.doc that whould make $a = C:whatever.doc that would make $b = whatever.doc The file will upload from C: but will not upload from the desktop. --------------------------------------------------------------------------- [2001-05-12 19:19:42] [EMAIL PROTECTED] I created an upload script that will upload to my ftp server, the variable $file comes from a different file: $a = stripslashes ($file); $b = basename ($a); $ftp_server = "ftp_server"; $ftp_user_name = "user"; $ftp_user_pass = "password"; $dir = "ftp"; $conn_id = ftp_connect("$ftp_server"); $login_result = ftp_login($conn_id, "$ftp_user_name", "$ftp_user_pass"); $cd = ftp_chdir ($conn_id, $dir); $upload = ftp_put($conn_id, $b, $a, FTP_BINARY); if (!$upload) { echo "<b>Ftp upload has failed!</b><br>"; } else { echo "Uploaded<br>"; } $discon = ftp_quit($conn_id); echo "<i>$b</i>"; This script will work most of the time, but when the file to be uploaded is located in certain folders the file will not upload. I made one change to the php.ini file to allow uploads greater than 2 megs. --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=10835&edit=2 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]