Well, I need to design my own error handler function. Whenever error occur, I hope this function not only can keep the error log, but also direct user to another page.
I tried to put header() in this function, but in some cases, it popup the message saying the header already been sent...