ID: 14748 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Feedback Bug Type: FTP related Operating System: Unix PHP Version: 4.0.5 New Comment:
I have the same problem. The client on windows. The server on unix. $conn_id = ftp_connect($ftp_server); ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); ftp_put($conn_id, "./download", "D:\essai.map", FTP_BINARY); Previous Comments: ------------------------------------------------------------------------ [2002-04-04 11:51:26] [EMAIL PROTECTED] Yes, I still have this problem. As a matter of fact, I have the same problem when I use ftp_get. It won't recognize my local drive. It thinks the directory path is part of the file name (i.e. local path is "c:\\ftptesting\\testfile.csv". It thinks the file name is "c"\\ftptesting\\testfile.csv"). My local machine is a Windows 2000 box and the ftp server is a Unix box. ------------------------------------------------------------------------ [2002-03-26 18:40:16] [EMAIL PROTECTED] How can you have OS: "Unix" and a C: drive? That strikes me as odd. The example you showed works for me on a windows box with either forward slash or backslash if you get rid of the extra closing ')' in the last line. Do you still have this problem with php 4.1.2? ------------------------------------------------------------------------ [2001-12-28 17:21:25] [EMAIL PROTECTED] Okay, I've scoured the bug reports and the message lists and I'm not convinced that it's even possible to upload from a local file to an ftp server using ftp_put. No one seems to have a good answer to the multiple listings of people having this problem. I don't believe my problem is a security problem. My problem is that PHP wants to use the directory that my PHP program is in as the default directory for uploading. ftp_put won't recognize my C: drive as a local drive. Here is the gist of the code that doesn't seem to be working: $host = "ftp.cwplus.com"; $user = "username"; $password = "password"; $remotefile = "/www/cwplus/wendy/images/$filename"; $conn = ftp_connect("$host"); ftp_login($conn, $user, $password); ftp_put($conn, $remotefile, "C:/test.txt", FTP_BINARY)) I've done all kinds of slash manipulation for the local file and none seem to help. Thanks, Bob ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=14748&edit=1