|  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
 [2004-10-06 15:42 UTC] qadeer_ahmad at yahoo dot com
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:/';
$server_file = 'www/download/';
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";
if ($conn_id) {

Expected result:
i am trying to download a file naming which is present in 'www/download/' i want to download this file in my local hard drive path c:/

NOTE: I also give this path as this 

$local_file = 'c:\';
$server_file = 'www/download/';

no error show also no file copy in my drive c:
but when i give this address.
$local_file = 'c:/';
$server_file = 'www/download/';
it give error which i write below

Actual result:
error is::

Warning: ftp_get(): Error opening c:/ in /home/comsdev/public_html/ftp2.php on line 27
There was a problem 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-10-06 15:48 UTC]
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 as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu Jan 27 21:03:35 2022 UTC