PHP with FTP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello php-general,

Hi. I ve got some trabl with this commands
ftp_pwd() and ftp_chdir()
They work correctly with some ftp servers,
but i ve got some problems with warftp server.
This server doesn't recognize them.

Here is my function

function engine($conn_id,$host_id)
{
if($conn_id==NULL){return NULL;}
$d_list=d_list($conn_id);
for($i=0;$i<count($d_list[1]);$i++)
 {
  if($d_list[0][$i]=='d')
   {
     ftp_chdir($conn_id, $d_list[1][$i]);
         if(ftp_pwd($conn_id)!='/'){$path=ftp_pwd($conn_id)."/".engine($conn_id,$host_id);}
     else {$path=ftp_pwd($conn_id).engine($conn_id,$host_id);};
         engine_reg($path,$host_id);
         ftp_cdup($conn_id);
        }
        else {
                  if(ftp_pwd($conn_id)!='/'){$path=ftp_pwd($conn_id)."/".$d_list[1][$i];}
                  else {$path=ftp_pwd($conn_id).$d_list[1][$i];}
              engine_reg($path,$host_id);
                  }; 
//      else echo ftp_pwd($conn_id)."/".$d_list[1][$i]."<br>";
 }
return 1;
}

-- 
Best regards,
 _-=MealstroM=-_                          mailto:mealstrom@xxxxxxxxxxxx

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux