note 36418 added to function.unlink

From: Date: Thu, 09 Oct 2003 04:17:20 +0000
Subject: note 36418 added to function.unlink
Groups: php.notes 
Request: Send a blank email to php-notes+get-58083@lists.php.net to get a copy of this message
<?php function del($path){ //del a file or rm a dir,del($path)=unlink($path)+rmdir($path) @chmod($path,0777); if(is_dir($path)){ substr($path,-1)=='/' or $path.='/'; if($fp=@dir($path)){ while($f=$fp->read())if($f!='.'&&$f!='..')del($path.$f); $fp->close(); } return @rmdir($path); } else return @unlink($path); } ?> ---- Manual Page -- http://www.php.net/manual/en/function.unlink.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+36418 Delete -- http://master.php.net/manage/user-notes.php?action=delete+36418&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+36418&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#58083) next »