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]
|