不是搞php的,结果挨拉去弄php,下载了个php程序,环境也配置好了
系统环境:window2003+IIS6+FastCGI+PHP5.3.4
网站根目录下 index.php里面有这句
if(!file_exists('install/lock')){echo '-'.realpath('install/lock').'-'.'-
';echo '-'.realpath('index.php').'-
'; // header('Location:install/index.php'); exit();}
客户端就返回这个
--
--
但是在install目录下index.php文件有下面的语句,确可以执行。。也能获取都路径,上级目录的也没问题。。
if (file_exists('lock')){@header("Content-type: text/html; charset=UTF-8");echo '-'.realpath('lock').'-
';echo '-'.realpath('../index.php').'-
';echo "系统已经安装过了,如果要重新安装,那么请删除install目录下的lock文件";exit;}
-D:phpwebswesambonew20151206installlock-
-D:phpwebswesambonew20151206index.php-
系统已经安装过了,如果要重新安装,那么请删除install目录下的lock文件
什么问题了,哪里没配置好?
回复讨论(解决方案)
fuck.....网站根目录的上级目录(D:phpwebs)没有加上网站用户的访问权限,这个问题导致的,加上这个就好了。。妈蛋。。
为什么asp.net不用就没问题呢。。。搞死人php。。。
你把 header('Location:install/index.php'); 都注释掉了,当然只能输出 --
--
if(!file_exists('install/lock')){ //如果 install/lock 不存在,则进入分支
echo '-'.realpath('install/lock').'-'.'-
'; //打印一个不存在的文件全名,自然是空的空
echo '-'.realpath('index.php').'-
'; //这个输出空的不对的,应该是你写错了
// header('Location:install/index.php'); //这个注释掉了,自然没有动作
exit();
}
本文原创发布php中文网,转载请注明出处,感谢您的尊重!