thinkphp error message: system error

Download the latest version 3.1.3, define an application, enter the application's config.php, add the database class link information in it, M() a table in the controller, and access the controller method prompt: The system has an error. If the connection string DSN method is used, and the DSN is passed in when calling M(), the result can be displayed normally.
The final solution is: delete the compiled file ~runtime.php in the Runtime directory, and run the program again to display it normally, so the problem should be in the ~runtime.php file generated when the application was originally created!

 

The reason has been found. After changing the configuration information, the configuration items obtained by ~runtime.php cannot be automatically updated synchronously. Therefore, it is necessary to manually delete ~runtime.php before normal operation.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325289611&siteId=291194637