You are here: Re: how to catch the execption of DOMDocument::load() « PHP Programming Language « IT news, forums, messages
Re: how to catch the execption of DOMDocument::load()

Posted by Janwillem Borleffs on 01/09/08 10:16

sunnyboyGuo@gmail.com schreef:
> How can I catch this exception and use header function to write header
> information?
>

Which PHP version are you using? With PHP5 you can use try/catch:

try {
// do what you want to do
} catch (Exception $ex) {
Header("http/1.1 500 Internal Server Error");
}


With PHP4, when the error is non-fatal, you can surpress the error
message by prepending an at sign (@) before the functional call.



JW

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация