|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-10-06 15:48 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 07:00:01 2025 UTC |
Description: ------------ i am trying to download a file from my webserver but it did not working and giving error before this script i connect to the ftp server and it connected. Reproduce code: --------------- <? $local_file = 'c:/aaa.zip'; $server_file = 'www/download/aaa.zip'; if (ftp_get($conn_id, $local_file, $server_file, FTP_BINARY)) { echo "Successfully written to $local_file\n"; } else { echo "There was a problem\n"; exit(); } if ($conn_id) { ftp_close($conn_id); } ?> Expected result: ---------------- i am trying to download a file naming aaa.zip which is present in 'www/download/aaa.zip' i want to download this file in my local hard drive path c:/aaa.zip NOTE: I also give this path as this $local_file = 'c:\aaa.zip'; $server_file = 'www/download/aaa.zip'; no error show also no file copy in my drive c: but when i give this address. $local_file = 'c:/aaa.zip'; $server_file = 'www/download/aaa.zip'; it give error which i write below Actual result: -------------- error is:: Warning: ftp_get(): Error opening c:/aaa.zip in /home/comsdev/public_html/ftp2.php on line 27 There was a problem