473,406 Members | 2,371 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

First CGI Script isn't right

TMS
119 100+
I'm using the book Programming Python and I just tried the first CGI script. This is the script:

Expand|Select|Wrap|Line Numbers
  1. print "Content-Type: text/html\n"
  2. print "<TITLE>CGI 101</TITLE>"
  3. print "<H1>A First CGI script</H1>"
  4. print "<P>Hello, CGI world!</P>
  5.  
And this is what it looks like when I open my browser (er... IE), and look at it:
print "Content-Type: text/html\n" print "" print "
A First CGI script

" print "
Hello, CGI world!

"
I really don't think its supposed to show print, "content-type... etc. "
The book shows it just running the text. Any ideas?

signed.... noobie

TMS
Apr 16 '07 #1
2 1638
ghostdog74
511 Expert 256MB
since you are doing a cgi script, you should put this script to your web server's cgi directory. let the web server execute the script for you. if you just see it using your web browser, it will just print out those text in plain on your browser. That's why you see those "print" words on your browser. check with your web server's documentation.
Apr 17 '07 #2
TMS
119 100+
ahhhhhhhhh....

'redface'

Thanks :)

tms
Apr 17 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: DonLi | last post by:
Hello, I tested a PHP script with a FORM of 2 element and it delivered the mail but then when I added more FORM elements, it failed to deliver. Following is the content of the PHP script that...
10
by: R.Marquez | last post by:
I hope I don't bore you with this personal experience. But, I hope the details are helpful for other Python and/or Linux newbies, or for those thinking about becoming such. I have been using...
11
by: Fuzzyman | last post by:
What's the best, cross platform, way of finding out the directory a script is run from ? I've googled a bit, but can't get a clear answer. On sys.argv the docs say : argv is the script name...
2
by: Sammy | last post by:
Hi Guys I have this form which checks for values before it process itself, all of the validation is working ok but to check for the strName if empty nothing works with it!! if i check for IsEmpty...
18
by: barry | last post by:
I'm having a problem creating a delay before each list item gets moved ( http://www.polisource.com/PublicMisc/list-splitter-timeout-bug.html ). Choose any number of columns, vertical layout, and...
7
by: Dr J R Stockton | last post by:
I've heard that at <URL:http://www.merlyn.demon.co.uk/js-clndr.htm#P> and using Opera the suffixed dates in the yellow box appear in a single long line instead of in the obvious weekly manner. ...
10
by: Tom Cole | last post by:
While I've done javascript work for as long as I can remember (since Netscape first released it), I've only ever used it for trivial things, change a color here, validate a text element there, blah...
3
by: aventerprise | last post by:
<html> <head> <title></title> <script type="javascript" src="E:\Internet\positive_gearing.js"> function positve_gearing() { var price = form.price.value; var rates = form.rates.value;
2
by: Marek Staniewski | last post by:
I need to make a window, which will be later placed on the internet page. In the window should be some map dispalyed. But this map is in fact a simple graphic file (e.g in *.jpg format) The...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.