fopen warning error message
| From: | Ade Smith | Date: | Thu, 08 Feb 2001 23:45:22 +0000 |
| Subject: | fopen warning error message | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-38839@lists.php.net to get a copy of this message | ||
Hi
I am trying to open a file which exists remotely(code works), but there may
be times when it may not exist, however when I change the url so that it
purposely doesn't exist to test this situation I get an error message like
the following:
Warning: fopen("<remote_url>","r") - No error in test.php on line 5
How can I prevent this error message appearing and let my error checking
below deal with it ?
Here is my code:
if(!$file = fopen("<remote_url>", "r")):
echo"could not open remote file";
else:
<page code>
endif;
Many Thanks
Ade
-------------------------------------
ade@stormbreaker.com
-------------------------------------