当前目录下有2个文件:1.php和2.php
1.php代码
<code><?phprequire "./2.php";//报错:Failed opening requiredrequire "2.php";//正常运行?></code>
Server API:ISAPI
PHP:5.2.17
服务器:IIS 6.0
回复内容:
当前目录下有2个文件:1.php和2.php
1.php代码
<code><?phprequire "./2.p<strong>2本文来源gaodaima#com搞(代@码$网6</strong><pre>搞gaodaima代码
hp”;//报错:Failed opening requiredrequire “2.php”;//正常运行?>
Server API:ISAPI
PHP:5.2.17
服务器:IIS 6.0
解决办法:文件明明存在,却require_once(./*.php)出错
是不是命令行执行的? 命令行下的当前目录并不是脚本文件目录. 你可以使用 getcwd()
输出看一下