Posted by Janwillem Borleffs on 10/01/44 11:37
David Haynes wrote:
> If you want to know if *any* unlink was unsuccessful:
> $success=true;
> foreach($file_arr as $file) {
> $success |= unlink($file);
> }
$success = false;
foreach (......)
> If you want to know which unlink failed:
> foreach($file_arr as $file) {
> if( unlink($file) ) {
> echo "Cannot unlink $file\n";
> }
> }
>
if ( ! unlink($file) ) {
....
}
JW
Navigation:
[Reply to this message]
|