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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
48 + 34 = ?
Subscribe to this entry?

 
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 10:01:26 2024 UTC