鱼C论坛

 找回密码
 立即注册
查看: 993|回复: 1

学cgi时打不开hello.py文件

[复制链接]
发表于 2019-4-5 13:09:07 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
本帖最后由 Ael 于 2019-4-6 01:24 编辑

安装了apache服务器,在浏览器打开http://localhost/显示it work,但是打开http://localhost/D:/Apache24/cgi-bin/hello.py显示
Forbidden
You don't have permission to access /D:/Apache24/cgi-bin/hello.py on this server.

附代码

#!D:\Python\python-3.7.2-amd64.exe

print ("Content-type:text/html")
print ()                             
print ('<html>')
print ('<head>')
print ('<meta charset="utf-8">')
print ('<title>Hello Word - 我的第一个 CGI 程序!</title>')
print ('</head>')
print ('<body>')
print ('<h2>Hello Word! </h2>')
print ('</body>')
print ('</html>')

按引擎说的改文件755权限也不行,论坛朋友棒棒忙,弄了很久也没好
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

 楼主| 发表于 2019-4-6 01:24:29 | 显示全部楼层
有人吗?
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2026-1-15 02:40

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表