note 31732 added to function.fopen
| From: | Eugene at rack1 dot php dot net | Date: | Thu, 01 May 2003 21:45:12 +0000 |
| Subject: | note 31732 added to function.fopen | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-47360@lists.php.net to get a copy of this message | ||
Two issues with the fopen() function:
In PHP 4.2.3, if you try to fopen() a URL, you get this error:
php_network_getaddresses: getaddrinfo failed: host/servname not known
If you try to fopen() a URL that does not exist, you get this error:
fopen("http://www.joemama.com/nonexistentfile.php",
"r") - Error 0
... but according to the documentation here, fopen() should return false if the file does not exist,
rather than generating a warning.
--
http://www.php.net/manual/en/function.fopen.php
http://master.php.net/manage/user-notes.php?action=edit+31732
http://master.php.net/manage/user-notes.php?action=delete+31732
http://master.php.net/manage/user-notes.php?action=reject+31732