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
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:
15 + 39 = ?
Subscribe to this entry?

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