Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

(shockme) Re: (Ovid) Re: Command Line Output Different from Output to Browser

by shockme (Chaplain)
on Mar 26, 2002 at 03:42 UTC ( [id://154316]=note: print w/replies, xml ) Need Help??


in reply to (Ovid) Re: Command Line Output Different from Output to Browser
in thread Command Line Output Different from Output to Browser

The first 5 require statements produce the following:
<HTML> <HEAD> <TITLE>Various :: Test Node #1</TITLE> <STYLE TYPE="text/css"> BODY {background: white;} H2.std-header {color: white; background-color: #006699;} H5.std-header {color: white; background-color: #006699;} P.std-title {color: #006699; background-color: #CCCCCC;} A {color: #006699;} A.header {color: #FFFFFF} EM {color: #006699;} KBD {font-family: serif; color: #006699;} PRE.code {color: #006699;} STRONG {color: #006699;} <STYLE> </HEAD> <BODY> <CENTER> <H2 CLASS="std-header">Various :: Test Node #1 <H5 CLASS="std-header"> <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%"><TR> <TD WIDTH="20%"><A HREF="/shock/index.pl?NodeID=1" CLASS="header">Main +</A></TD> <TD WIDTH="20%"><A HREF="/" CLASS="header">Music</A></TD> <TD WIDTH="20%"><A HREF="/shock/index.pl?NodeSection=linux" CLASS="hea +der">Linux</A></TD> <TD WIDTH="20%"><A HREF="/shock/index.pl?NodeSection=perl" CLASS="head +er">Perl</A></TD> <TD WIDTH="20%"><A HREF="/family/index.php" CLASS="header">Family</A>< +/TD> <TD WIDTH="20%"><A HREF="/shock/links.php" CLASS="header">Links</A></T +D> </TR></TABLE> </H5> </H2> </CENTER>
I realize using the require statements introduce certain maintainability issues. My ultimate goal is to be able to make a change in one place and have that change reflected throughout the site. My current approach may not be "the best way to do it," but as I (attempted to say | said) at the outset, this is more a learning exercise than an actual production system.

If things get any worse, I'll have to ask you to stop helping me.

Replies are listed 'Best First'.
Re: (shockme) Re: (Ovid) Re: Command Line Output Different from Output to Browser
by reclaw (Curate) on Mar 26, 2002 at 04:15 UTC
    The problem here is in the HTML. It will probably looks ok in Internet explorer but not in Netscape. You need to close H2 and remove the H5 tag before the table and remove the close h2, h5 and center tags at the end...
Re: (shockme) Re: (Ovid) Re: Command Line Output Different from Output to Browser
by shockme (Chaplain) on Mar 26, 2002 at 14:13 UTC
    Oops. Okay, invalid HTML. I can correct that. However, even under Internet Explorer, it's never being output to the browser. If I move the print statements from the require script to the main script, the print statements work (invalid HTML and all). However, when print from within the require script, it never makes it to the browser.

    That's the real point of this thread (I hope). Why is the script operating differently when I move the print statements?

    Again, this is just a learning exercise for me. I don't care what the answer is. I just want to know what the answer is.

    If things get any worse, I'll have to ask you to stop helping me.

      You haven't said weather or not you're printing an html header. Either way, enter:
      print "Content-Type: text/html\n\n";
      On a line before "require("HEADER01.pl");" in your code above. If that doesn't work, post the code in "HEADER01.pl".

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://154316]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (6)
As of 2024-03-28 20:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found