【发布时间】:2013-12-25 16:36:41
【问题描述】:
我有一个 PHP 文件位于:
/epcusers/toolsamc/users/epcvt/VT/CTM/CTM80/Billing/bin/runVT.php
它的权限是rwxrwxrwx (777),所有者是epcvt : users
我想通过从此文件发起的 AJAX 请求调用 runVT.php 文件:
/var/www/html/evtgen/evt_run.php
我试过用这个 Javascript 来调用它:
var xmlhttp;
if (window.XMLHttpRequest)
{
xmlhttp=new XMLHttpRequest();
}
else
{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open("GET","/epcusers/toolsamc/users/epcvt/VT/CTM/CTM80/Billing/bin/runVT.php" ,true);
xmlhttp.send();
}
但我总是收到未找到文件的响应:
The requested URL /epcusers/toolsamc/users/epcvt/VT/CTM/CTM80/Billing/bin/runVT.php was not found on this server.
我也试过
xmlhttp.open("GET","../../../../epcusers/toolsamc/users/epcvt/VT/CTM/CTM80/Billing/bin/runVT.php" ,true);
和
xmlhttp.open("GET","epcusers/toolsamc/users/epcvt/VT/CTM/CTM80/Billing/bin/runVT.php" ,true);
但这也没有用。
为了检查我是否在文件夹中遗漏了一些东西,我去了 Unix 中的 /var/www/html/evtgen/ 文件夹并检查了两者:
vi /epcusers/toolsamc/users/epcvt/VT/CTM/CTM80/Billing/bin/runVT.php
vi ../../../../epcusers/toolsamc/users/epcvt/VT/CTM/CTM80/Billing/bin/runVT.php
他们都工作了(我得到了脚本文本)。我错过了什么?
【问题讨论】:
标签: javascript php ajax unix directory