Re: supressing include warnings....
| From: | Richard Davey | Date: | Wed, 07 Jan 2004 02:27:12 +0000 |
| Subject: | Re: supressing include warnings.... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-173935@lists.php.net to get a copy of this message | ||
Hello Ryan,
Wednesday, January 7, 2004, 2:17:11 AM, you wrote:
RA>
RA> {@include("http://www.site.com/product/check.php?ver=2&update=0");}
RA> else{}
RA> $test_once=1;
RA> One problem, if something goes wrong instead of doing nothing its displaying
RA> warnings....even though I have put a @ in front trying to suppress them.....
include() will always generate a Warning if the file fails to open. If
you have no control over the file you're trying to open (i.e. it might
or might not exist) then use fopen() instead. Because the file is
remote and opened via HTTP it includes the output of it anyway (as
opposed to the actual source code), so it's the same end result as
fopen().
--
Best regards,
Richard mailto:rich@launchcode.co.uk