Send code directly below
Copy CodeThe code is as follows:
/*
file:config_smarty.php
Done: Configuring Smarty
Author:www.5dkx.com
Date:2009-12-21
*/
Include_once (".. /libs/smarty.class.php ");
Class Mysmarty extends smarty{
function __construct ()
{
$this->smarty ();
$this->config_dir = ". /config ";
$this->cache_dir = ". /cache ";
$this->template_dir = ". /template ";
$this->compile_dir = ". /template_c ";
$this->cache = false;
}
}
$smart = new Mysmarty ();
$smart->assign ("title", "title");
$smart->assign ("content", "contents");
$smart->display (' Article.tpl ');
$output = $smart->fetch (' Article.tpl ');
$Path = ". /html/1.html ";
$fp = fopen ($Path, "w");
Fwrite ($fp, $output);
Fclose ($FP);
?>
http://www.bkjia.com/PHPjc/321558.html www.bkjia.com true http://www.bkjia.com/PHPjc/321558.html techarticle The following direct code copy code code is as follows:? PHP/* file:config_smarty.php done: Configure Smarty author:www.5dkx.com date:2009-12-21 */include_once ( ".. /libs/smarty.class.php "); CL ...