Re: is_file() and is_dir() not finding a zipped directory
| From: | Jeffry Killen | Date: | Sun, 24 Apr 2016 22:27:24 +0000 |
| Subject: | Re: is_file() and is_dir() not finding a zipped directory | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-325552@lists.php.net to get a copy of this message | ||
On Apr 24, 2016, at 2:51 PM, Jasper Kips wrote:
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 JKOp 24 apr. 2016, om 22:13 heeft Jeffry Killen <jekillen@prodigy.net> 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.phpHi 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