ThinkPHP Call common and common. php Function Prompt Error function undefined Solution

  • 2021-07-16 02:05:33
  • OfStack

This paper mainly introduces the solution of function undefined when ThinkPHP calls common/common. php function to prompt error function undefined. For friends who use ThinkPHP for project development, they often encounter such problems after upgrading ThinkPHP. The specific description is as follows:

After upgrading ThinkPHP, the latest version of ThinkPHP 3.2 was used, and the general function was put into common/common. php, but the error prompt of function undefined appeared when calling the function on the specific page.

After checking the official documents, it is found that the original ThinkPHP 3.2 version common. php file has been renamed function. php,
So common. php-- > Change to function. php, and the function call is successful! Problem solved!

I hope the method described in this paper is helpful to the development of ThinkPHP.


Related articles: