phplib从php3开始开发,是元老了。
现在停止开发也是很正常的

解决方案 »

  1.   

    phplib短小一些smarty大一些,功能强大仅用过这两种模板
      

  2.   

    用它不如用smartTemplate,编译型的肯定要比解释型的快
      

  3.   

    phplib分离得不够彻底,使用得时候经常还是需要考虑到数据得结构在程序里作处理
      

  4.   

    phplib还可以,不过多层循环不方便
    phpbb还用phplibsmartTemplate也不错,不过好像一定要放在当前目录下
    如果是自已的主机无所谓,可以放在pear目录可以用这个smarty-light
    http://www.paullockaby.com/projects/smarty-light/还有smarty
    我用smarty 写的留言板要1秒多
    我其它不变换成smarty-light,和,smartTemplate
    smartTemplate 要0.03 秒左右
    smarty-light  也差不多,快一点吧大概0.025右右还有php5好像比php4慢
    正在为难中。如果用php5可以用pdo,直接使用soap
    如果用php4 用soap又慢,因为php4没有内置soap
      

  5.   

    听说tinybutstrong模板构思很巧妙 
    而且几乎可以使模板与程序完全分离~ 不过E文太差 网上找不到中文文档 郁闷中 看来学好英语还是很重要的哦 :(
      

  6.   

    楼主,“听说tinybutstrong模板构思很巧妙,而且几乎可以使模板与程序完全分离”
    有点言过其实了!
    tinybutstrong确实比phplib的template要好一些,但绝不是你听说的那么好。这是tinybutstrong的一个示例模板
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>TinyButStrong</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <link href="tbs_us_examples_0styles.css" rel="stylesheet" type="text/css">
    </head>
    <body>
    <p align="center" class="title-page">Example of dynamic columns</p>
    <table width="500" border="0" align="center" cellpadding="2" cellspacing="0">
      <tr>
        <td>Creating dynamic columns with TinyButStrong is simple but a bit delicate. It doesn't need any specific parameter. But you have to think to expand columns on every rows of the basic table using a <u>different</u> bloc for <u>each</u> row. Columns must be merged before rows.</td>
      </tr>
    </table>
    <br>
    <table width="500" border="0" align="center" cellpadding="4" cellspacing="2">
      <tr>
        <td class="text-section2">In this example, the script creates a multiplication table with alternated row's color. You can change the number of columns and rows.</td>
      </tr>
      <tr>
        <td><form action="[var..script_name]" method="get" name="frm_nbr" id="frm_nbr">
            <div align="center">Number of rows:
              <input name="nbr_row" type="text" id="nbr_row" value="[var.nbr_row]" size="2" maxlength="2" style="width:30px;">
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Number of columns:
              <input name="nbr_col" type="text" id="nbr_col" value="[var.nbr_col]" size="2" maxlength="2" style="width:30px;">
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
              <input name="btn_ok" type="submit" id="btn_ok" value="  Ok  ">
            </div>
          </form></td>
      </tr>
      <tr>
        <td><table border="1" align="center" cellpadding="0" cellspacing="0">
            <tr bgcolor="#F0F0F0">
              <td width="30" bgcolor="#FF9966"><div align="center">X</div></td>
              <td width="30" bgcolor="#FFD8B0"><div align="center" class="title-section">
                  <div align="center">[c0.key;block=td] </div>
                </div></td>
            </tr>
            <tr bgcolor="#F0F0F0">
              <td bgcolor="#FFD8B0" class="title-section"><div align="center">[r.$;block=tr]</div></td>
              <td bgcolor="#DBDBDB"><div align="center">[r.[c1.val;block=td]] </div></td>
            </tr>
            <tr bgcolor="#F0F0F0">
              <td bgcolor="#FFD8B0" class="title-section"><div align="center">[r.$;block=tr]</div></td>
              <td bgcolor="#FFFFFF"><div align="center">[r.[c2.val;block=td]] </div></td>
            </tr>
          </table></td>
      </tr>
    </table>
    </body>
    </html>这是与之配套的php程序
    <?include_once('tbs_class.php') ;$TBS = new clsTinyButStrong ;
    $TBS->LoadTemplate('tbs_us_examples_dyncol.htm') ;// Retreiving user data 
    if (!isset($_GET)) $_GET=&$HTTP_GET_VARS ;
    $nbr_row = (isset($_GET['nbr_row'])) ? intval($_GET['nbr_row']) : 10;
    $nbr_col = (isset($_GET['nbr_col'])) ? intval($_GET['nbr_col']) : 10;// List of column's names
    $columns = array();
    for ($col=1;$col<=$nbr_col;$col++) {
    $columns[$col] = 'column_'.$col;
    }// Creating data
    $data = array();
    for ($row=1;$row<=$nbr_row;$row++) {
    $record = array();
    for ($col=1;$col<=$nbr_col;$col++) {
    $record[$columns[$col]] = $row * $col;
    }
    $data[$row] = $record;
    }// Expanding columns
    $TBS->MergeBlock('c0,c1,c2',$columns) ;// Merging rows
    $TBS->MergeBlock('r',$data) ;
    $TBS->Show() ;?>
      

  7.   

    从一开始就接触到了模板,phplib,smarty,smarttemplate...
    用了很长一段时间现在却越来越讨厌模板,正处于两难之间
      

  8.   

    回复:uuq(杜牧)
    smartTemplate也不错,不过好像一定要放在当前目录下
    如果是自已的主机无所谓,可以放在pear目录
    -------------------------------------------------
    可以设置$_CONFIG这个全局变量的
      

  9.   

    目前在用phplib,等有了时间,想研究一下别的模版
      

  10.   

    PHPLIB固然简单
    而且功不可没
    但毕竟是解释型的
    现在开始用smarttemplate了
    有机会研究下pear下PHPLIB的升级版本
      

  11.   

    jiangyuntao(姜运涛) 你误解了
    我是说程序文件不是模板
    我发现在以自己改一行程序就可以实现了
    161行 $header  .=  "include_once \"smarttemplate_extensions/smarttemplate_extension_$extension.php\";\n";$header  .=  "include_once \"".__FILE__."smarttemplate_extensions/smarttemplate_extension_$extension.php\";\n";或者自定义一个路径
    $header  .=  "include_once \"".__FILE__."smarttemplate_extensions/smarttemplate_extension_$extension.php\";\n";
      

  12.   

    PHPLIB现在有新版本了~~~大家不妨用用看与以前有啥区别!