Recursively scan directory and sub-directories through FTP with PHP?

The fact that it was working before you gave it more inputs seems to me to suggest that it might be a problem there. Try putting a set_time_limit(300) at the top which will allow it to run for 5 minutes before timing out and see if that fixes the problem.

The fact that it was working before you gave it more inputs seems to me to suggest that it might be a problem there. Try putting a set_time_limit(300); at the top which will allow it to run for 5 minutes before timing out and see if that fixes the problem.

The PHP manual says that the default time limit is 30 seconds. And the max_execution_time of PHP on my server is 120. When my script was running in the past, it would take a while to finish - longer than 120 seconds.

How is that possible? Does PHP time individual commands or the entire script? I tried setting it to 300 seconds and nothing changed.

– Boogz Nov 5 '10 at 23:38.

I haven't tested this out, but here's how I did it a while back: $hostname = 'write.your.server. Here'; $username = 'username'; $password = 'password'; $startdir = 'starting/directory'; // absolute path $suffix = "gif,png,jpeg,pdf,php"; // suffixes to list $files = array(); $conn_id = ftp_connect($hostname); $login = ftp_login($conn_id, $username, $password); if (!$conn_id) { echo 'Wrong server! '; exit; } else if (!$login) { echo 'Wrong username/password!'; exit; } else { $files = raw_list("$startdir"); } ftp_close($conn_id); function raw_list($folder) { global $conn_id; global $suffix; global $files; $suffixes = explode(",", $suffix); $list = ftp_rawlist($conn_id, $folder); $anzlist = count($list); $i = 0; while ($i ") { raw_list($path); } else if(substr($itemname,0,2)!

= ". _" AND in_array($endung,$suffixes)) { array_push($files, $path); } $i++; } return $files; }.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions