On Thursday 27 September 2001 09:09, * R&zE: wrote:

> > How do I turn off the error messages that appear at the top of the
> > page?  I have this function below that if an image is not there for
> > $url, it give a "warning".
> >
> > $size = GetImageSize("$url");
> >
> > Example error message below...
> >
> > Warning: getimagesize: Unable to open 'http://www.yahoo.com' for
> > reading. line 28
> >
> >
> > Joseph
>
> </Original message>
>
> <Reply>
>
> Ofcourse it might just be a strange idea stuck in my head for some
> reason, but you know what helps? Writing code that doesn't produce
> any errors or warnings. Supressing warnings by just not showing them
> doesn't really make your code very reliable does it?!

Right in principle. But there are cases (common ones), like the one shown 
above, where errors are unavoidable and normal. For these cases the @ 
operator is the right thing. Generally you're right though - error 
reporting should be set to E_ALL and reasons of avoidable errors/warnings 
should be eliminated.

-- 
Christian Reiniger
LGDC Webmaster (http://lgdc.sunsite.dk/)

REALITY.SYS corrupted ... reboot Universe [Y,n]?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to