Re: is_file() and is_dir() not finding a zipped directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Apr 24, 2016, at 2:51 PM, Jasper Kips wrote:


Op 24 apr. 2016, om 22:13 heeft Jeffry Killen <jekillen@xxxxxxxxxxx> het volgende geschreven:


when code checks for the existence of file, the function fails to
find it. So I added test for directory:

if(!is_file($_file) || !is_dir($_file))
{
// returns error string
}


PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Hi Jeffry,
What I see you doing is testing if it isn’t a file OR it isn’t a directory. Somehow that always is true.

(Glad you fixed it though)

Jasper

Thank you: Your right, that didn't occur to me. It looks like it should be && instead of ||.

Thank you for your time and attention
JK


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux