cgi help - html wont format!
i have a very long subroutine, actually its a subroutine that includes a long script, and for some reason after i call it html will no longer format, it is just displayed in the browser as html. heres what i mean...
# do stuff here then call the subroutine
$this = &That(@whatever);
print "Content-type: text/html\n\n";
print qq(
<h2>The Result is: $this</h2>
);
the browser prints the html tags literally instead of formatting them. something happens within &That that is causing this (if i comment out '&That(@whatever);' the browser DOES format the html) but im not sure what. I remember encountering this a couple of years ago but i dont remember the solution.
The script included in &That returns 1, i thought that may have something to do with it but without it i get a comp err.
Any help would be appreciated. Ive spent 6 hours on this already, i guess ill get some sleep for once and hope someone knows whats wrong.
Mark Hensler posted this at 08:16 — 9th November 2000.
He has: 4,048 posts
Joined: Aug 2000
I've had this problem before as well.... and forgot too.
can we see more of the code? (like whats in &That()
anti posted this at 11:11 — 9th November 2000.
They have: 453 posts
Joined: Jan 1999
I'm sure "that" has some output.
Always print the "Content-Type: ...." first.
Otherwise the server won't take it as the mime-type.
ROB posted this at 04:25 — 10th November 2000.
They have: 447 posts
Joined: Oct 1999
anti, you were correct. &That was indeed printing something. i had put a line that simply printed a '1' for debugging earlier and i forgot about it i figured it out by following your suggestion of printing the header before calling &That to see what was being printed. Thanks for the help.
Mark Hensler posted this at 04:49 — 10th November 2000.
He has: 4,048 posts
Joined: Aug 2000
the smallest mistakes cause the biggest headaches
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.