Hi:
I use pg_connect() to connect to my postgresql database, when there is a mistake, the php engine will echo the error message, can someone tell me how to catch this error message to give its value to a variable. I guess error_handler can do, any other methods?
eg. I want to catch this error message and make it the value of a variable named $messagebody, and then send it to my mailbox.
sincerely
Yuping Wang
How to catch error?
Moderator: General Moderators
Another way to stop a function displaying errors is to prefix an @ to the function eg
Code: Select all
@pg_connect()-
lancet2003
- Forum Newbie
- Posts: 20
- Joined: Sat Aug 09, 2003 11:29 pm
-
markbeadle
- Forum Commoner
- Posts: 29
- Joined: Tue Dec 02, 2003 2:50 am
- Location: Aachen, Germany