PHP Error Handling

« Previous Tutorial Next Tutorial »

Error handling plays an important role, if you are going to make a professional web applications using PHP.

While writing your PHP program you should check all the possible error condition before going ahead and take appropriate action when required

Go through the following example without having /tmp/test.xt file and with this file

		die("File not found");
		print "File Opened successfully";
	// Test of the code here

Here is the general form to define a custom error in PHP:

error_function(error_level,error_message, error_file,error_line,error_context);

Here is the explanation of the above parameters used in defining a custom error in PHP:

« Previous Tutorial Next Tutorial »

Latest 5 Posts by CodesCracker


Quick Links
Signup - Login - Give Online Test