我有一个位于:/epcusers/toolsamc/users/epcvt/VT/CTM/CTM80/Billing/bin/runVT.php中的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他们都起作用了(我拿到了剧本)。我错过了什么?
发布于 2013-12-08 16:45:21
在文档根目录(/var/www/html/)中创建一个文件,任意调用它。
在这个文件中,让它调用您的文件/epcusers/toolsamc/users/epcvt/VT/CTM/CTM80/Billing/bin/runVT.php。
示例:
<?php
require_once '/epcusers/toolsamc/users/epcvt/VT/CTM/CTM80/Billing/bin/runVT.php';任何不在文档根目录中的内容都不能被客户端访问,除非您有一个PHP文件连接它(或者apache重写,但这是另一回事)。
https://stackoverflow.com/questions/20455881
复制相似问题