Home >PHP Framework >YII >Where are the public function files in the Yii framework located?
We take the yii2-advanced version as an example:
yii framework)
YII2 adopts PHP’s new feature namespaceEstablishing public methods<?php namespace common\helps; /* * 自定义全局公共方法 */ class tools{ public static function hello(){ echo 'hello world!'; } } ?>For more programming-related content, you can follow the
Introduction to Programming column on the php Chinese website!
The above is the detailed content of Where are the public function files in the Yii framework located?. For more information, please follow other related articles on the PHP Chinese website!