«

thinkphp5 初始化

Genius 发布于 阅读:21


<?php
namespace app\test\controller;
use think\facade\Env;
use think\Controller;

class YangZheWei extends Controller
{
protected function initialize(){
parent::initialize();
echo 'init';
}
public function index()
{
return Env::get('module_path');
}
public function test()
{
return '12';
}
}