ThinkPHP calls the common/common. php function and prompts the error functionundefined solution _ php instance

Source: Internet
Author: User
This article mainly introduces ThinkPHP calling commoncommon. the solution to the error functionundefined prompted by the php function is a problem that is often encountered during ThinkPHP programming upgrade. If you need it, refer to this article to introduce ThinkPHP to call common/common. php function prompts the error function undefined solution. For those who use ThinkPHP for project development, ThinkPHP upgrades often encounter such problems. The detailed description is as follows:

After ThinkPHP is upgraded, the latest ThinkPHP3.2 version is used to put common functions into common/common. php. However, the function undefined error message is displayed when the function is called on a specific page.

After checking the official documentation, we found that the original ThinkPHP3.2 common. php file has been renamed function. php,
So change common. php ---> to function. php. The function is successfully called! Solve the problem!

I hope this method will be helpful for ThinkPHP development.

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.