ServerinfoController.class.php under the
Controller file
<?php
namespace Admin\Controller;
use Think\Controller;
class ServerinfoController extends controller{
public function Serverinfo(){
require 'info.php';
$this->display();
}
}
?>
How to write the file path of info.php, you can refer to View/con, info under the con folder. php path. Instead of referencing info.php### under the root directory www
TP5.0 ROOT_PATH variable gets the project root directory TP5.1 Env::get('app_path') gets the project root directory. Read more about the official documentation of TP5