note 16552 deleted from function.unlink by jimw
| From: | jimw@php.net | Date: | Sun, 04 Nov 2001 01:30:37 +0000 |
| Subject: | note 16552 deleted from function.unlink by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-20406@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 :)