|
|
Open
bool Open( [string filename], [ CACHED, [int time = not specified => default time] ] ) |
The Open() function serves to open
the file template the file can have any extension (. htm. html. tpl,php ...).
If filename is empty, TPLN will open the template which has the same name as your script with your default extension |
<?php
// Simple opening
$TPLN->Open("my_file.html");
// or you can do
$TPLN->Open(); // will open the same name as your script + default extension
?>
<?php
// Opening with cache to 3600 seconds is 1 hour :
// if not specified TPLN use the default configuration in TPLN_Cfg.php
if ( !$TPLN ->Open("my_file",CACHED, 3600) )
{
//code to execute to generate the file
}
$TPLN->Write(); // print result
?>
|
Attention ! |
If the extension of the file is php, php3, phtml, php4,
then the file will be executed automatically by Php. |
|