开发者

JustHost.com and Python CGI

开发者 https://www.devze.com 2023-01-20 16:16 出处:网络
I\'m trying to get justhost.com to compile a python CGI script (helloworld.py)without much luck.The site says python works, but I can\'t find much.

I'm trying to get justhost.com to compile a python CGI script (helloworld.py) without much luck. The site says python works, but I can't find much.

I'm using http://webpython.codepoint.net/cgi_tutorial

开发者_运维技巧

Has anyone gotten it to work?


Ok, I figured it out.

for justhost.com users you must do a few things.

  • set up a directory in 'public_html/' called 'scgi-bin/'
  • go to your control panel and the 'advanced options' -> 'Apache Handlers' -> now add a user defined apache handler ( handler: cgi-script, extenstion: .py) and 'add.'
  • write your helloworld.py (http://webpython.codepoint.net/cgi_hello_world)
  • upload this to the 'scgi-bin/' folder earlier created. (beware: must be uploaded in ascii format. Dreamweaver apparently uses binary as default, i used filezille (set transfer mode to ascii)
  • run! www.yoursite.com/scgi-bin/helloworld.py
0

精彩评论

暂无评论...
验证码 换一张
取 消