当路径已添加到php.ini指令时,打开\u basedir限制警告
所以,我很困惑。这是我的错误当路径已添加到php.ini指令时,打开\u basedir限制警告,php,windows,iis,drive,Php,Windows,Iis,Drive,所以,我很困惑。这是我的错误 Warning: scandir(): open_basedir restriction in effect. File(\{ip address}\Docs) is not within the allowed path(s): (C:\inetPub;\\{ip address}\Docs) in C:\inetpub\apps.hnewbie.com\Docs\test.php on line 9 Warning: scandir(\{ip address}
Warning: scandir(): open_basedir restriction in effect. File(\{ip address}\Docs) is not within the allowed path(s): (C:\inetPub;\\{ip address}\Docs) in C:\inetpub\apps.hnewbie.com\Docs\test.php on line 9
Warning: scandir(\{ip address}\Docs): failed to open dir: Operation not permitted in C:\inetpub\apps.hnewbie.com\Docs\test.php on line 9
Warning: scandir(): (errno 1): Operation not permitted in C:\inetpub\apps.hnewbie.com\Docs\test.php on line 9
我最初是这样做的,使用驱动器号(S:)和完整路径。我得到了open_basedir限制警告,因此我在php.ini中向open_basedir指令添加了S:\drive full路径。重新启动IIS服务器,但上述错误仍然存在。所以我想我会在php.ini和我的代码中将字母驱动器更改为IP地址,看看这是否会有所不同。事实并非如此
这是我的PHP代码:
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
//ini_get('open_basedir');
$dir = "\\{ip address}\Docs";
$ffs = scandir($dir);
?>
所以我不知道下一步该怎么办。我将S:\drive aka{ip address}上的权限更改为Everyone组。我仍然得到警告。是否还有其他步骤可以让我的PHP应用程序读取驱动器(顺便说一句,这是一个网络映射驱动器)?请参阅
$dir=“\\\{ip地址}\\Docs”代码>@lawrencerone谢谢你链接到这个问题。我很感激。我听从了你的建议,但我得到了这个错误:登录失败:未知用户名或错误密码。(代码:1326)。我知道这是一个未知的用户名和密码,但它指的是什么?