"newstable.">
当前位置:Gxlcms > PHP教程 > 关于fasttemplate的有关问题

关于fasttemplate的有关问题

时间:2021-07-01 10:21:17 帮助过:34人阅读

关于fasttemplate的问题
今天我写了一段PHP的fasttemplate代码如下
include ( "class.FastTemplate.php3 ");

$template = new FastTemplate( ". ");

$template-> define(array(main => "main.tpl ", newstable => "newstable.tpl ", newsrow => "newsrow.tpl "));

$listf = fopen( "articlelist.txt ", "r " );

list($title, $category, $date, $fname) = fgetcsv($listf, 4096, ": ");
while( !feof($listf) )
{
$template-> assign(STITLE, $title);
$template-> assign(SCATEGORY, $category);
$template-> assign(SDATE, $date);
$template-> assign(SFNAME, $fname);

$template-> parse(NEWSROWS, ".newsrow ");
list($title,$category,$date,$fname) = fgetcsv($listf, 4096, ": ");
}
$template-> parse(BODY, newstable);
$template-> parse(OUTPUT, main);
$template-> FastPrint(OUTPUT);
?>

但网页输出几乎是文件class.FastTemplate.php3中的内容,百思不得其解,请各位高手帮忙。先谢了!!

------解决方案--------------------
class.FastTemplate.php3 ?!

php文件一般是以php扩展名结束的,如果你没有在服务器特别设置php3也是的话。
你把文件的扩展名改php试试
------解决方案--------------------
不是让你把php3改成php试试了吗?你试过了?

人气教程排行