Home >Backend Development >PHP Tutorial >ThinkPHP323 custom function library
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/>"; }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
call
Result: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.