Controller文件下ServerinfoController.class.php
<?php
namespace Admin\Controller;
use Think\Controller;
class ServerinfoController extends controller{
public function Serverinfo(){
require 'info.php';
$this->display();
}
}
?>
info.php这文件路径怎么写,可以引用View/con,con文件夹下info.php路径.而不是引用根目录www下info.php
TP5.0 ROOT_PATH变量获取项目根目录 TP5.1 Env::get('app_path')获取项目根目录多看看TP5的官方文档