iSelfSchooling.com  Since 1999     References  |  Search more  | Oracle Syntax  | Free Online Oracle Training

    Home      .Services     Login       Start Learning     Certification      .                 .Share your BELIEF(s)...

 

. Online Accounting        .Copyright & User Agreement   |
    .Vision      .Biography     .Acknowledgement

.Contact Us      .Comments/Suggestions       Email2aFriend    |

 

How to debug PHP (debugging PHP)?

How to debug PHP (debugging PHP)?


You should include the following line to your script to see error. Notice that the “Display errors” option is disabled by default in php.ini. 
init_set(‘display_errors’,1);
The following is an example of how to turn the Display error option on. You should use the Display error option to debug your PHP script. Notice that when you see an blank screen that indicates that there is an error in your script.
You can use the error_reporting() function to determine what type of error PHP reports to you. 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitionl.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<title>Rating from users</title>
</head>

<body>

<?php 
init_set(‘display_errors’,1); // turn on my display error option
error_reporting(0); // Turn of the error reporting
error_reporting(E_ALL); // Turn on all the errors 

// This page receives the data from ratingweb.html.
print “Thank you $title $name for your rating.” <br />
print “You stated that this web site is: $response” <br />
print “Your comments: <br /> $suggestions” 
?>

</body>
</html>

 

 

Google
 
Web web site