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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2022 The PHP Group
All rights reserved.
Last updated: Sat Jan 29 01:03:36 2022 UTC