php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30338 download file from server to local harddisk
Submitted: 2004-10-06 15:42 UTC Modified: 2004-10-06 15:48 UTC
From: qadeer_ahmad at yahoo dot com Assigned:
Status: Not a bug Package: FTP related
PHP Version: 4.3.9 OS: windows 2000
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: qadeer_ahmad at yahoo dot com
New email:
PHP Version: OS:

 

 [2004-10-06 15:42 UTC] qadeer_ahmad at yahoo dot com
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 



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-10-06 15:48 UTC] derick@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Jul 04 15:01:36 2025 UTC