When the PHP command line is running, the syntax exception information is not listed.

Source: Internet
Author: User
Tags php syntax error
When the PHP command line is running, no syntax error information is listed. when I run the PHP file in the command line, no syntax error is prompted and no output is provided, if no error occurs, the running result (web page source code) can be correctly output ). When I configure the debugging function in editplus, there is a syntax error and no error message is prompted. I only output "output finished & nbsp; (time consumed & nbsp; the syntax error message is not listed when the 0 & nb PHP command line is run.
When I run the php file in the command line, there are no syntax errors or prompts, and nothing is output. if there are no errors, the running results (web page source code) can be correctly output ). When I configure the debugging function in editplus, there is a syntax error and no error message is prompted. I only output "output completed (0 seconds)-normal termination ", if there is no error, the output is correct. Is my php configuration file incorrect? as a result, the syntax is not listed incorrectly during php running. thank you. PHP syntax error command line Editplus share:
------ Solution --------------------
The error prompt function is not enabled.
Ini file
Display_errors
------ Solution --------------------
Set it by yourself

Http://php.net/manual/en/function.error-reporting.php

 
// Turn off all error reporting
Error_reporting (0 );

// Report simple running errors
Error_reporting (E_ERROR
------ Solution --------------------
E_WARNING
------ Solution --------------------
E_PARSE );

// Reporting E_NOTICE can be good too (to report uninitialized
// Variables or catch variable name misspellings ...)
Error_reporting (E_ERROR
------ Solution --------------------
E_WARNING
------ Solution --------------------
E_PARSE
------ Solution --------------------
E_NOTICE );

// Report all errors before T E_NOTICE
// This is the default value set in php. ini
Error_reporting (E_ALL ^ E_NOTICE );

// Report all PHP errors (see changelog)
Error_reporting (E_ALL );

// Report all PHP errors
Error_reporting (-1 );

// Same as error_reporting (E_ALL );
Ini_set ('error _ report', E_ALL );

?>

------ Solution --------------------
You mean the php warning blocking operation.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.