Html 在raspberry pi上的lighttpd web服务器中通过/var/www/cgi-bin运行.cgi脚本
我在跟踪一个几岁的孩子 我有一个文件结构:Html 在raspberry pi上的lighttpd web服务器中通过/var/www/cgi-bin运行.cgi脚本,html,lighttpd,pi,Html,Lighttpd,Pi,我在跟踪一个几岁的孩子 我有一个文件结构: /var/ /www/ (index.html for a webpage with buttons is contained here and displays perfectly) /cgi-bin/ (containing cgi scripts with permissions granted) html代码包含从/cgi-bin/调用脚本的函数: function centertilt() { xm
/var/
/www/ (index.html for a webpage with buttons is contained here and displays
perfectly)
/cgi-bin/ (containing cgi scripts with permissions granted)
html代码包含从/cgi-bin/调用脚本的函数:
function centertilt()
{
xmlhttp.open("GET","cgi-bin/centertilt.cgi",true);
xmlhttp.send();
}
以及调用这些函数的按钮
button {
color: blue;
background:lightgrey;
border: 1px solid #000;
border-radius: 8px;
position: center;
}
...
<button style="height: 50px; width: 100px; font-size: 25px" onclick="centertilt()">0</button>
...
按钮{
颜色:蓝色;
背景:浅灰色;
边框:1px实心#000;
边界半径:8px;
位置:中心;
}
...
0
...
当我通过CLI运行.cgi脚本时,它们工作正常,但按下按钮时不会调用它们。您是否尝试过在cgi URL中使用以“/”开头的路径
xmlhttp.open("GET","/cgi-bin/centertilt.cgi",true);
您是否查看了lighttpd错误日志中的错误,或查看了lighttpd访问日志中的请求