note 16552 added to function.unlink
| From: | PHPLOVER at fake dot com | Date: | Sun, 04 Nov 2001 00:25:30 +0000 |
| Subject: | note 16552 added to function.unlink | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-20405@lists.php.net to get a copy of this message | ||
I got this snippet from BEGINNING PHP4 by WROX PUBLISHING:
if(!isset($WINDIR)) {
$userfile = str_replace("/", "\\", $file);
exec("del $file");
if(file_exists("$file")) die("Can't delete the file $file.");
}
else if(!(@unlink($file)) {
die("Can't delete the file $file.");
}
Could be useful :)
--
http://www.php.net/manual/en/function.unlink.php
http://master.php.net/manage/user-notes.php?action=edit+16552
http://master.php.net/manage/user-notes.php?action=delete+16552
http://master.php.net/manage/user-notes.php?action=reject+16552