Error_reporting in the use of PHP programming frequency, presumably everyone is very clear, this article introduces the usage of error_reporting, for everyone to learn the reference. If the parameter level is not specified, the current error levels
[PHP]
; PHP is also a constantly evolving tool, and its functionality is constantly being truncated.
; And PHP.ini's settings change can reflect a considerable change,
; It's good to study php.ini before using the new PHP version.
;;;;;;;;;;;;;;;;;;
1. errors such as program errors can be easily handled. for example, syntax errors or compiler errors that cannot be parsed will not pass compilation during compilation, then you can find the specific error code according to the error prompt. But
PHP error Type 1: program errors & nbsp; these errors can be easily handled, such as syntax errors or compiler failures. during compilation, then, you can find the specific error code based on the error prompt. However, when an error occurs in the
In many cases, php files may encounter some very difficult-to-troubleshoot errors, such as output of large white pages. It is possible that the PHP error level shields some non-fatal errors, resulting in no error prompt. Therefore, understanding and
Php error handling and php error. Php error handling. php errors are in PHP. the default error handling is very simple. An error message is sent to the browser. The message contains the file name, row number, and description of the error message.
?
; Error handling and logging;
; Error control and registration;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; The error report is bitwise. Or add up the numbers to get the error report level you want.
; E_all-All errors and warnings
; E_error-Fatal Run-time
F in many cases, our PHP files will have some very difficult to troubleshoot errors, such as the output of large white pages, wrong debugging. It is possible that the error level of PHP masked some non-fatal errors, resulting in no error prompts. So
* For now, avoid warnings of e_strict mode
* (This must is done before function definitions)
*/
if (defined (' e_strict ')) {
$old _error_reporting = error_reporting (0);
if ($old _error_reporting & e_strict) {
Document directory
Don't panic
Do not separate databases
Do not restart the Database Service
Do not rush to run REPAIR
Run integrity check
Root Cause Analysis
Database File Corruption may be the biggest headache for DBAs. In this article,
PHP setup Problems & acceleration suggestions
Application in use
Program If you cannot use PHP due to incorrect settings, check the following parameter settings in PHP. ini.
Assume that your PHP is installed on D:/PHP/
;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Error reports are reported by bit. Or add the numbers to get the expected error report level.
; E_all-all errors and warnings
; E_error-fatal runtime error
; E_warning-runtime warning (non-fatal error)
;
Php learning notes:
Simple die () statement
Custom error functions and triggers
Error Report
Basic error handling: Use the die () function
If (! File_exists ("welcome.txt ")){
Die ("FIle not found ");
} Else {
$ File = fopen
PHP Learning Note--error
Different error handling methods: Simple die () statement custom error function and error trigger error report
Basic error handling: Using the Die () function
if (!file_exists ("Welcome.txt")) {die ("File not Found");} else{$
PHP is a simple and easy to learn, powerful language, especially in the web development, the development of high efficiency, convenient and fast. It's a good idea to study php.ini about PHP-related configurations and get a better understanding of
;;;;;;;;;;;;;;;;;;;; Resource restrictions;;;;;;;;;;;;;;;;;;;;; Maximum number of seconds for each script to be executedMax_execution_time = 30; The maximum time for each script to analyze the request dataMax_input_time = 60; Maximum input variable
[PHP]; PHP is also a constantly evolving tool, and its functionality is constantly being truncated.; And PHP.ini's settings change can reflect a considerable change,; It's good to study php.ini before using the new PHP version.;;;;;;;;;;;;;;;;;;;;
; This directive controls whether or not andwherePHP would output errors, notices and warnings too. Error Output isvery useful during development, but; it could be very dangerousinchproduction environments. Depending on the code; Which istriggering
Today's Lesson: PHP 3-Day Foundation Consolidation video Tutorial "Yan 18"1.php Error Reporting settings/*php script error, divided into multiple levels, such as fatal error, notice (reminder), warning (warning), n multilevel how to conveniently set
1. Unusual Uniqueness in PHPThe uniqueness of exceptions in PHP is that exceptions in PHP are different from those in mainstream languages C + + and Java. In Java, exceptions are the only way to report errors, not in PHP, but to treat all anomalies
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.