[Php-debug] using php-l debug PHP error encountered pit

Source: Internet
Author: User
Tags php error

Sometimes, because of the increase in system code, causing many files to be interrelated, or some third interface (etc.), you have to debug online.

On-line environment, we are all set "Ini_set (' display_errors ', false)" in order to prevent errors from being exposed online, to avoid increasing the risk of code exposure, and to see a more user-friendly experience.

So, I developed a habit of directly on the Linux server, using Php-l to check the running files, and always thought that the command will also check the "Call undefined function" errors and so on.

It was only today that php-l only checked the simple syntax specification and did not check for other errors, such as: variable undefined, whether the called function exists, and so on.

In other words, php-l just checks the file's syntax and does not check the file for errors at all.

// # php-l application/controller/openplatform.php//no syntax errors detected in application/controller/ openplatform.php//called a nonexistent function--urlecode (), the error php-l is not checked out $weixin _register_url = "https:// Open.weixin.qq.com/connect/oauth2/authorize?appid=wxa5a632d87776f994&redirect_uri= ". Urlecode ($weixin _ Redirect_uri). ' =&response_type=code&scope=snsapi_userinfo&state=1#wechat_redirect ';

[Php-debug] using php-l debug PHP error encountered pit

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.