创建一个common模块,然后访问
此时报错:
因为common.php已经被tp作为公共模块,tp框架不允许通过url访问。
那么可以通过index模块访问
<?php
namespace app\index\controller;
use app\common\controller\Index as commonIndex;
class Index
{
public function index()
{
return 'index';
}
public function common(){
$common = new commonIndex();
return $common->index();
}
}