note 30156 added to function.ftp-rmdir

From: Date: Sat, 08 Mar 2003 19:26:28 +0000
Subject: note 30156 added to function.ftp-rmdir
Groups: php.notes 
Request: Send a blank email to php-notes+get-45006@lists.php.net to get a copy of this message
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... -- http://www.php.net/manual/en/function.ftp-rmdir.php http://master.php.net/manage/user-notes.php?action=edit+30156 http://master.php.net/manage/user-notes.php?action=delete+30156 http://master.php.net/manage/user-notes.php?action=reject+30156

« previous php.notes (#45006) next »