note 36423 deleted from function.ftp-delete by didou

From: Date: Thu, 09 Oct 2003 12:16:09 +0000
Subject: note 36423 deleted from function.ftp-delete by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-58119@lists.php.net to get a copy of this message
Note Submitter: springchun@21cn.com(21ks.com) ---- function ftp_del($file){ //del a file or dir(tree dir) if(@ftp_size($this->fp,$file)==-1){ $data=ftp_rawlist($this->fp,$file); substr($file,-1)=='/' or $file.='/'; foreach($data as $value){ $tmp=preg_split('/[ ]+/si',$value); if($tmp[8]!='.'&&$tmp[8]!='..'){ if(substr($tmp[0],0,1)=='d')$this->ftp_del($file.$tmp[8]); else ftp_delete($this->fp,$file.$tmp[8]); } unset($tmp); } return ftp_rmdir($this->fp,$file); } else return ftp_delete($this->fp,$file); }

« previous php.notes (#58119) next »