/www/wwwroot/cloud.lincq.cn/代码整理/layui开发的云盘/index.php配置文件不存在“/config.php”'); } require("./config.php"); //载入cdir类 include_once("./functions/cdir.class.php"); //获取密码 $username = $config['username']; $password = $config['password']; //如果开启了验证 if(@$config['auth'] === TRUE){ //基本验证 if ( ($_SERVER['PHP_AUTH_PW'] !== $password) || ($_SERVER['PHP_AUTH_USER'] !== $username) ){ header('WWW-Authenticate: Basic realm="Please verify."'); header('HTTP/1.0 401 Unauthorized'); exit('权限不足!'); } } //根据不同的请求载入不同的方法 //如果没有请求控制器 if((!isset($c)) || ($c == '')){ //载入主页 include_once("./functions/home.php"); } //不允许放的控制器 else if($c == 'indexes'){ echo '非法请求!'; exit; } else{ include_once("./functions/".$c.'.php'); }