Jump to content

Recommended Posts

Posted

I also wondering whether I can somehow start a python program (helloworld.py) in cpanelx? When I click on View it shows the source code which is btw:

 

#!/usr/bin/python

print "Content-type:text/html\r\n\r\n"
print '<html>'
print '<head>'
print '<title>Hello Word - First CGI Program</title>'
print '</head>'
print '<body>'
print '<h2>Hello Word! This is my first CGI program</h2>'
print '</body>'
print '</html>'

 

Do I need to chmod and use the Content-Type Header also.

 

Thank you all for assisting me, your support is utmost beneficiary

 

Cokie

Guest Geoff
Posted

You need to place that file in the cgi-bin directory.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...