<?php chdir(dirname(__FILE__));//把当前目录设置为当前目录?> 将 PHP 的当前目录改为 directory。 参数 directory 新的当前目录 返回值 如果成功则返回 TRUE,失败则返回 FALSE。 <?php require_once('../global.php');//现在的当前目录是global.php所在的目录 require_once('./lilang.php'); require_once('./admin/index.php'); $arr=new Ulike_nihao();?> 转载于:https://www.cnblogs.com/jianxin-lilang/p/5644992.html