php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24385 Problem download a file in local disk
Submitted: 2003-06-29 09:26 UTC Modified: 2003-06-29 10:51 UTC
From: bruny dot pitou at caramail dot com Assigned:
Status: Not a bug Package: FTP related
PHP Version: 4.3.2 OS: Windows NT
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: bruny dot pitou at caramail dot com
New email:
PHP Version: OS:

 

 [2003-06-29 09:26 UTC] bruny dot pitou at caramail dot com
Description:
------------
I have a problem with ftp_get and ftp_put.
My server Apache has set up on Linux.
I must download a file in my local disk (Windows NT)
I have an error : 
      Warning: ftp_get(): error opening C:/fichier.txt
My code is :
if($connexion){
    if(ftp_login($connexion,$user,$pass)){
    $res=ftp_get($connexion,"C:/fichier.txt","fichier.txt",FTP_BINARY);
    
                                  Help me, please.
                                  Thanks.

Reproduce code:
---------------
if($connexion){
        if(ftp_login($connexion,$user,$pass)){
                $res=ftp_get($connexion,"file:///C:/stock/listeaffaires.csv","listeaffaires.csv",FTP_BINARY);
                if($res){
                        echo "t?l?chargement r?ussi<br>";
                        }
                        else{
                        echo "t?l?chargement rat?";
                        }
        }else{
        echo "login ou mot de passe mauvais";
        }
     }else{
        echo "probleme de connexion";
}

?>

Expected result:
----------------
Warning: ftp_get(): error opening file:///C:/stock/listeaffaires.csv in /usr/local/www/socetem.fr/essai/connect.php on line 6
t?l?chargement rat?

Actual result:
--------------
Warning: ftp_get(): error opening file:///C:/stock/listeaffaires.csv in /usr/local/www/socetem.fr/essai/connect.php on line 6
t?l?chargement rat?

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-29 10:51 UTC] iliaa@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Use C:/stock/listeaffaires.csv and not file:///C:/stock/listeaffaires.csv.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 05 06:01:36 2025 UTC