我在一些if/else语句中运行下面的代码,我在同一个文件中有一个奇怪的问题下面的确切代码工作正常,但是在另一个区域,如果它被称为我得到这个错误;
Warning: include() [function.include]: URL file-access is disabled in the server configuration in C:\webserver\htdocs\processing\process.friends.php on line 168
Warning: include(http://localhost/index.php) [function.include]: failed to open stream: no suitable wrapper could be found in C:\webserver\htdocs\processing\process.friends.php on line 168
$_SESSION['sess_msg'] = 'Please Enter the Correct Security Code';
$_GET["friendid"] = $friendid;
$_GET["p"] = 'mail.captcha';
$_GET["f"] = 'friend';
include ("index.php");
exit;
为了澄清,我正在尝试同时运行这段代码2次,更像是这样;不只是这样,但你得到的一点是,它们不是同时运行的
if(something){
run the code above
}else{
run the code above
}
如果重要的话,我目前正在一台windows电脑上运行一个lamp安装程序
最佳答案
删除代码中的“http://localhost”部分。根据经验,当您包含自己的文件时,应该包含来自文件系统的文件。
include "./index.php";