[PHP] FTP Download via SSl PART 2

Dieses Thema im Forum "Webentwicklung" wurde erstellt von tobigiger, 21. März 2007 .

Schlagworte:
  1. 21. März 2007
    FTP Download via SSl PART 2

    Hi leute ich bin es wieder...

    was ist an diesem abschnitt falsch?

    PHP:
    function  filecollect ( $dir , $filelist ) {
        global 
    $conn_id //Get our ftp
        
    global  $path ;
        
        
    $files  ftp_nlist ( $conn_id , $dir );  //get files in directory
        
    foreach ( $files  as  $file
        {
            
    $isfile  ftp_size ( $conn_id $file );
            if(
    $isfile  ==  "-1"
            { 
                
    //Is a file or directory?
                
    echo  "<pre>" ;
                echo 
    "ignore directory!  $file " ;
                echo 
    "</pre>" ;
            }
            else 
            {
                
    $replacetags  = array( "\\" "//" );
                
    $downloadfile  substr ( $file strlen ( $dir ) +  1 strlen ( $file ));
                
    $result  ftp_get ( $conn_id $path . "/" . $downloadfile $file FTP_BINARY );
                if ( !
    $result  )
                {
                    echo 
    "<pre>There was a problem while downloading file:  $file </pre>" ;
                }
                else
                {
                echo 
    "<pre>File  $file  downloaded successful!</pre><br>" ;
                }
                
    $filelist [( count ( $filelist )+ 1 )] =  $file //If not, add it as a file to the file list
            
    }
        }
        return 
    $filelist ;
    }

    Es kommt immer diese fehlermeldung
    "Warning: Invalid argument supplied for foreach() in C:\Programme\xampp\htdocs\test\ftp.php on line 81"
     
  2. 21. März 2007
    AW: FTP Download via SSl PART 2

    Guck dir an, ob ueberhaupt was in dem Array ist und was.

    var_dump($files);
     
  3. Video Script

    Videos zum Themenbereich

    * gefundene Videos auf YouTube, anhand der Überschrift.