Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Re: php style includes

by andreychek (Parson)
on Jul 02, 2001 at 23:50 UTC ( #93301=note: print w/ replies, xml ) Need Help??


in reply to Re: php style includes
in thread php style includes

   How about HTML::Template
Agreed. If you use HTML::Template, you can use include statements within your HTML documents. Something like this could go in your index.html (or where ever):
<html> <body> <tmpl_include="templates/top.html"> <tmpl_include="templates/left.html"> <tmpl_include="templates/main.html"> <tmpl_include="templates/bottom.html"> </body> </html> In your Perl code, you would just say: <code> use HTML::Template(); # open the html template my $template = HTML::Template->new(filename => 'index.html'); # Fill in various parameters here ... # Send header here ... # print the template print $template->output;
The documentation for this module is very good, just read up on it for instructions on what all you can do with it.
-Eric


Comment on Re: Re: php style includes
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (9)
As of 2014-12-25 19:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (162 votes), past polls