note 30156 deleted from function.ftp-rmdir by aidan

From: Date: Fri, 29 Jul 2005 07:08:45 +0000
Subject: note 30156 deleted from function.ftp-rmdir by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-92695@lists.php.net to get a copy of this message
Note Submitter: admin at xliners dot org ---- For the example above this message, you also have to ignore the folders '.' and '..' or there will be an infinite clause. . . . foreach($file_list as $dir) { if($dir != "." && $dir != "..") { if(ftp_size($ftp_site,$dir)===-1){ // dirname ftp_rmAll($ftp_site,$dir); // recursion }else { ftp_delete($ftp_site,$dir); // del file } } . . . Hope it helps someone...

« previous php.notes (#92695) next »