Trying to get a complette list of files in a ftp directory.

function filelist($conn_id){ 
 $contents = ftp_nlist($conn_id, "");
 // output $contents
 var_dump($contents);
 return $contents;
}


function connectFTP($ftp_server,$ftp_port,$ftp_user,$ftp_pass,$ftp_dir){ 
 // set up a connection or die
 $conn_id = ftp_connect($ftp_server,$ftp_port) or die("Couldn't connect to 
$ftp_server"); 


 @ftp_login($conn_id, $ftp_user, $ftp_pass) or die("Couldn't log in to FTP 
server");
 // try to change the directory 
 $mode = ftp_pasv($conn_id, TRUE);
 if (ftp_chdir($conn_id, $ftp_dir)) {
 // if (ftp_chdir($conn_id, '/PLC/')) {
 echo "Current directory is now: " . ftp_pwd($conn_id) . "\n";
 
 } else { 
 echo "Couldn't change directory\n";
 }
 
 return $conn_id;
}


connectionID = connectFTP(server,port,user,pass,dir);
filelist(connectionID);


Works fine on the development server, but when i run it on the server i get 
the following error:

PHP Warning: ftp_nlist(): Unable to create temporary file. Check 
permissions in temporary files directory

Is it not possible to use this command in GAE?

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/d/optout.

Reply via email to