Home > Backend Development > PHP Tutorial > ThinkPHP323 custom function library

ThinkPHP323 custom function library

WBOY
Release: 2016-07-29 08:59:21
Original
1321 people have browsed it

Because the way of customizing function libraries in previous versions of ThinkPHP is inconsistent with the way of customizing function libraries in the current version 3.2.3, an error will be reported

:(
Call to undefined function HomeControllershow()
Error location
FILE: D:php_demowxtestApplicationHomeControllerIndexController.class. php LINE: 11
ThinkPHP3.2.3 { Fast & Simple OOP PHP Framework } -- [ WE CAN DO IT JUST THINK ]

My custom function is:

<?php function show()
{
    echo "hello world<br/>";
}
Copy after login
The previous version seems to be defined in Application/Common /common.php, but version 3.2.3 does not work. The correct approach is to define the path as: Common/Common/function.php instead of common.php and functions.php

callThinkPHP323 custom function library

Result:

ThinkPHP323 custom function library

The above introduces the ThinkPHP323 custom function library, including the content. I hope it will be helpful to friends who are interested in PHP tutorials.

ThinkPHP323 custom function library

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template