【发布时间】:2019-10-27 12:33:43
【问题描述】:
我有这个简单的 .html 表单
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<form action="/cgi-bin/test">
<input type="text" placeholder="Your name here">
<input type="submit" value="Conferma">
</form>
</body>
</html>
这应该会在我的/usr/lib/cgi-bin 位置调用 CGI 程序。
不幸的是,出现了一个错误: Error: your file was not found
即使文件实际上在我的文件夹中: Present in the directory
请注意,CGI 程序是用 C 编写的,非常简单:
#include <stdio.h>
int main() {
printf("Content-type:text/plain\n\n");
printf("Hello World!\n");
return 0;
}
- 问题出在哪里?
【问题讨论】: