PHP path reference settings
学容错
学容错 2018-10-19 10:54:32
0
1
995

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
学容错
学容错

reply all(1)
胤彬-

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template