|
|
#1 |
|
Swine Buddy
Join Date: Apr 02
Location: Langley, Berks, UK Mode: Restructuring
Posts: 4,833
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
I just finished creating an error handling class in PHP. The source code is here:
http://www.sccode.com/projects/filem...src/error.phps The documentation here: http://www.sccode.com/projects/filem...r_handler.html Feel free to use it if you like it and if you have any comments or suggestions, please let me know. Here's a quick code snippet demonstrating its use: PHP Code:
__________________
PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2 | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am. Random VisualAd: Spread happiness and joy. Rate good posts.
|
|
|
|
|
|
#2 |
|
Frenzied Member
Join Date: Dec 01
Location: OH, USA
Posts: 1,945
![]() |
I've been meaning to write something like this. Thanks for doing the work for me.
__________________
format your code!! - [vbcode] [/vbcode] ANSWERS CAN BE FOUND HERE!! my personal company |
|
|
|
|
|
#3 |
|
Swine Buddy
Join Date: Apr 02
Location: Langley, Berks, UK Mode: Restructuring
Posts: 4,833
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Just updated the class. It had a small bug in it.
__________________
PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2 | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am. Random VisualAd: Spread happiness and joy. Rate good posts.
|
|
|
|
|
|
#4 |
|
Terrible Member
Join Date: Aug 06
Location: United States
Posts: 2,853
![]() ![]() |
Re: Error Handler Class
|
|
|
|
|
|
#5 |
|
Swine Buddy
Join Date: Apr 02
Location: Langley, Berks, UK Mode: Restructuring
Posts: 4,833
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Re: Error Handler Class
Fixed.
__________________
PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2 | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am. Random VisualAd: Spread happiness and joy. Rate good posts.
|
|
|
|
|
|
#6 |
|
Terrible Member
Join Date: Aug 06
Location: United States
Posts: 2,853
![]() ![]() |
Re: Error Handler Class
ok great thanks! I might use it on a project that i am working on.
|
|
|
|
|
|
#7 |
|
Frenzied Member
Join Date: Nov 05
Location: Cheshire, UK
Posts: 1,471
![]() ![]() |
Re: Error Handler Class
Might be a nice idea to have a switch so that if on, when the email is sent, include the POST and GET vars, this would help identify the cause of the error, and also to catch people trying to hack it.
__________________
Chris Codebank: Easy Javascript Form Validation (OOP) If this post helped please rate it! |
|
|
|
|
|
#8 |
|
Terrible Member
Join Date: Aug 06
Location: United States
Posts: 2,853
![]() ![]() |
Re: Error Handler Class
for admin_email can i include more then one email?
|
|
|
|
|
|
#9 |
|
Swine Buddy
Join Date: Apr 02
Location: Langley, Berks, UK Mode: Restructuring
Posts: 4,833
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Re: Error Handler Class
It uses the PHP mail function, so there should not be an issue if you separate the addresses with a comma.
__________________
PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2 | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am. Random VisualAd: Spread happiness and joy. Rate good posts.
|
|
|
|
|
|
#10 |
|
Terrible Member
Join Date: Aug 06
Location: United States
Posts: 2,853
![]() ![]() |
Re: Error Handler Class
ok i will try. The reason is i would like to have the script send an email to ME and then to the webmaster, who ever that is.
|
|
|
|
|
|
#11 |
|
Swine Buddy
Join Date: Apr 02
Location: Langley, Berks, UK Mode: Restructuring
Posts: 4,833
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Re: Error Handler Class
I am the webmaster. Done you remember?
__________________
PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2 | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am. Random VisualAd: Spread happiness and joy. Rate good posts.
|
|
|
|
|
|
#12 |
|
Terrible Member
Join Date: Aug 06
Location: United States
Posts: 2,853
![]() ![]() |
Re: Error Handler Class
silly me
|
|
|
|
![]() |
|
||||||
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|