TP5 (ThinkPHP5 Framework) Implementation of Displaying Error Information and Line Number Function


This paper illustrates the method of displaying error information and line number in TP5 (ThinkPHP5 framework). Share for your reference, as follows:

In the process of program debugging, if you want to debug and display detailed error information, you need to modify it.application\config.php

There are two settings in the file:show_error_msgValuefalseChange totrue

// Display error message
'show_error_msg'     => true,

After the change, the suggestion is as follows:

This prompt can’t tell what’s wrong. If you want to show a detailed error, you need to modify another one:

After modification, the error prompt becomes very detailed.

Readers who are interested in thinkPHP-related content can see the topics of this site: Introduction to ThinkPHP, Summary of Operation Skills of ThinkPHP Templates, Summary of Common Ways of ThinkPHP, Introduction to CodeIgniter, Introduction to Zend Framework Work Framework and PH. P template technology summary.

I hope this article will be helpful to you in the design of PHP program based on ThinkPHP framework.

Recommended Today

Java security framework

The article is mainly divided into three parts1. The architecture and core components of spring security are as follows: (1) authentication; (2) authority interception; (3) database management; (4) authority caching; (5) custom decision making; and;2. To build and use the environment, the current popular spring boot is used to build the environment, and the actual […]