You are here: Re: trouble with a delete function « PHP Language « IT news, forums, messages
Re: trouble with a delete function

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация