WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDES  |  PHP CLASSES  |  CODE SEARCH  |  ARTICLES SEARCH  |  PHP FORUMS  |  PHP MANUAL  |  PHP FUNCTIONS LIST  |  WEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Submit Your Code
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
WeberDev's Monthly code contest PHP Code Contest
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Index
PHP Web Logs (BLogs)
Web Development Resources
Web Development Content
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
Submit Site
Forex Trading Online forex trading platform

Go Back Add a Comment Send this example to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES ADD CODE EXAMPLES PRINT
Title : Custom error messages.
Categories : PHP, Debugging Update Picture
Darrell Brogdon
Date : Jul 16th 1998
Grade : 1 of 5 (graded 3 times)
Viewed : 4688
File : No file for this code example.
Images : No Images for this code example.
Search : More code by Darrell Brogdon
Action : Grade This Code Example
Tools : My Examples List

  Submit your own code examples 
 

Function error($text) {
$TIME=date("H:i:s");
echo("<B>Error:</B> $text<BR>\n");
echo("<B>Time:</B> $TIME<BR>\n");
printf("<B>File:</B> %s<BR>\n", __FILE__);
printf("<B>Line:</B> %s\n", __LINE__);
}

USAGE:
error("Could not copy file");



The class to check load time of your script VERY usefull for relatively slow applications, but not only..
Categories : PHP, PHP Classes, Debugging
PhpView 0.1 - simple php viewer, using temporary files and frames.
Categories : PHP, PHP Options and Info, Debugging, HTML and PHP
Function to check connection to MySQL and redirect to an error page if an error occurs
Categories : MySQL, PHP, Debugging, Databases
Display variables when a form is submitted using POST/GET
Categories : PHP, Functions, Variables, Debugging
PHPLinkRot v1.0 - program which allows users to report broken links on your website just by clicking a button. Works well on custom 404 pages
Categories : PHP, Complete Programs, Debugging, URLs, Site Planning
A time measuring and performance benchmarking class
Categories : PHP, PHP Classes, Testing, Debugging, Date Time
phpDocumentor 1.1.0 - automatic documentation tool for PHP. Generates API documentation in HTML, PDF, and CHM formats with automatic linking, smart inheritance and packaging, very fast and stable. Official website http://www.phpdoc.org
Categories : Complete Programs, Debugging, PHP, Documentation
Newbie Notes #4 - Trapping dumb MySQL query errors
Categories : PHP, Databases, MySQL, Debugging, Beginner Guides
Memory Growth, Memory Leaks, Garbage Collection.
Categories : Debugging, PHP
Newbie Notes #3 - What went wrong? A useful little debugging aid
Categories : PHP, Beginner Guides, Debugging
An email validation script that actually checks against the recipient's mail server.
Categories : Email, Complete Programs, PHP, Network, Debugging
A Custom Error Handling And Debugging Class
Categories : PHP, PHP Classes, Debugging, Errors and Logging
Query2Report : Generating Html, Pdf and Csv Reports from SQL Query
Categories : PHP, PHP, HTML, PDF, Excel
Example of function to send out email if error occurs
Categories : PHP, Email, Debugging, Errors and Logging
Alert in JavaScript and Trace in Flash Action script are two commands that I find very much useful for tracking and debugging errors in my scripts. Unfortunately, there is no such option in PHP.
Categories : PHP, Java Script, Debugging