估计pchome几乎没人发表文章,哈哈对于smarty,有下面这段评论。I seriously believe that template engines like Smarty are a complete waste of our precious time. Luckily these packages are generally freely available, or they would be a complete waste of money as well. They do not add any features to PHP not already there, and by using them, dynamic web sites become more complex, a lot slower, and harder to maintain. That's right! Harder, not easier.
我写过缓存,数据处理,对于缓存于不缓存,速度都是一样的,不缓存多了读入模板的0.001秒的时间。时间我也比较过了,缓存速度比不缓存快是在循环1万次以上的情况,很多比较模板速度也是用循环10000次来比较,我经常暗笑,那样有意义吗?就算163那破页面,N长,还不到循环100次的时间。还有那个网站有循环一万次的变态行为。 缓存?那时用于不经常更新的网站,那需要用smarty那恐龙吗?对于phpe我的确判断失误,我以为它是实时更新的,原来不是,是4天更新一次,不过还是搞笑,内容已经固定了,还更新什么?回复?回复是实时更新的。 对于缓存文件有下面一段评论。Q: The 'better' template engines have a cache to make loading of pages much faster. Clean PHP doesn't do this, so the template engine is, in that case, faster! A: Incorrect. The cache in a template engine is needed to store the parsed template in some other format (Smarty uses PHP for that), which can then be instantly restored. With clean PHP the format is already correct, so there is no need to use a cache. Less and simpler lines code, faster execution. 对于比较静态的(实在没人气),只有回复时更新静态文件(html)是最佳选择,就像pchome。
麻烦先看看第一贴,晕,个csdn老是超时,我靠,发出去
麻烦先看看第一贴,晕,个csdn老是超时,我靠,发出去
麻烦先看看第一贴,晕,个csdn老是超时,我靠,发出去
麻烦先看看第一贴,晕,个csdn老是超时,我靠,发出去
一看就知道是类似phplib的超慢模板,据说是pear的,那就更烂了,pear的东西超烂^_^类不像类。随便说句,smarty更烂
//=========倒~~~这位仁兄能否写个不"烂"的??
静态到没话说……
缓存?那时用于不经常更新的网站,那需要用smarty那恐龙吗?对于phpe我的确判断失误,我以为它是实时更新的,原来不是,是4天更新一次,不过还是搞笑,内容已经固定了,还更新什么?回复?回复是实时更新的。
对于缓存文件有下面一段评论。Q: The 'better' template engines have a cache to make loading of pages much faster. Clean PHP doesn't do this, so the template engine is, in that case, faster!
A: Incorrect. The cache in a template engine is needed to store the parsed template in some other format (Smarty uses PHP for that), which can then be instantly restored. With clean PHP the format is already correct, so there is no need to use a cache. Less and simpler lines code, faster execution.
对于比较静态的(实在没人气),只有回复时更新静态文件(html)是最佳选择,就像pchome。
在这里不能谈必要不必要,也许人家写的熟练,写的快,管那么多干嘛,扯蛋呀?