[Phpwm] unlinking files

Rob Allen rob at akrabat.com
Sat Sep 30 09:08:18 BST 2006


Kevin Golding wrote:
> Someone, quite probably Rob Allen, once wrote:
>> I've just checked our library code and we do:
>>
>> if (is_file($form_field_file) && !is_dir($form_field_file))
>> {
>>    // do stuff
>> }
>>
>>
>> I wonder what the difference between file_exists() and is_file()
>> actually is?!
> 
> is_file() should return false for a directory, whereas file_exists()
> would return true for a directory.
> 
> So basically:
>  is_file() == ( file_exists() && !is_dir() ) 
> 

I'll have to update that code in our library :)

Regards,

Rob...



More information about the Phpwm mailing list