Posted by David Haynes on 10/05/77 11:37
Janwillem Borleffs wrote:
> 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
>
>
My bad ;-)
You are correct.
-david-
Navigation:
[Reply to this message]
|