Loading a php file in a template

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Chris

    Loading a php file in a template

    I would like to include a file that is generated by an php script. I
    am currently loading a html template:


    my $template = HTML::Template->new(filename =>
    "template/mainpage.templa te",
    die_on_bad_para ms => 0);



    And in mainpage.templa te I have the line:

    ..
    ..
    ..

    <TMPL_INCLUDE NAME="myfile.ht ml">

    ..
    ..
    ..


    Instead of myfile.html loading I would like to load the html generated
    by myfile.php. Is there a way to do this?


    Chris
  • Nikolai Chuvakhin

    #2
    Re: Loading a php file in a template

    cchong@cisunix. unh.edu (Chris) wrote in message
    news:<cd87463e. 0406221221.418c 585a@posting.go ogle.com>...[color=blue]
    >
    > I would like to include a file that is generated by an php script.[/color]

    Easy:

    readfile('http://localhost/path/to/your/script.php');

    Cheers,
    NC

    Comment

    Working...