Home  >  Article  >  Backend Development  >  关于fasttemplate的有关问题

关于fasttemplate的有关问题

WBOY
WBOYOriginal
2016-06-13 10:07:48929browse

关于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试试了吗?你试过了?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn