smarty模版不能正常使用

#1 yeyicheng

按照教程里配置输出没反应

|--- speedphp
    |--- controller
          |--- main.php
    |--- model
    |--- SpeedPHP
    |--- tmp
    |--- tpl
          |--- test.html
    |---index.php

main.php
class main extends spController
{
        function index(){
                echo "Enjoy, Speed of PHP!";
        }
        function test(){
                $ok = "i am ok!";
                $this->sent_ok = $ok; // 赋值给模板,这里是将$ok的值赋给了模板中的sent_ok,所以在模板中调用将是<{$sent_ok}>
                $this->display('test.html'); // 显示模板
        }
}

test.html:

       
       
        大家好,我是test.html。

        $sent_ok等于:<{$sent_ok}>
       
       

2012-11-19 16:28:38

#2 yeyicheng

解决了 tmp文件夹没有写入权限

2012-11-19 16:38:43