smarty模板编译生成文件报错

WBOY
Release: 2016-06-23 13:20:29
Original
1252 people have browsed it

代码在我小伙伴电脑上就是好的,在我电脑上打开就会在template_c处报错,检查报错指向的代码没发现问题。
temlpate_c是怎么生成的?可以删吗?跟配置有关系吗?后来又用了另一个人的全套代码,template_c中报错的文件就更多了,但是在人家原本的电脑上就好好的一点错也没有。郁闷。


回复讨论(解决方案)

看看生成缓存文件目录有没有写入权限

看看生成缓存文件目录有没有写入权限


这个吗?
 var $compile_dir     =  'templates_c';

temlpate_c 中的文件是 smarty 根据规则从 temlpate 中的模板文件生成的可执行 php 文件
你可将 temlpate_c 中的文件全部删除,让 smarty 重新生成
这样错误就不存在了


看看生成缓存文件目录有没有写入权限


这个吗?
 var $compile_dir     =  'templates_c';[/quote



看看生成缓存文件目录有没有写入权限


这个吗?
 var $compile_dir     =  'templates_c';

temlpate_c 中的文件是 smarty 根据规则从 temlpate 中的模板文件生成的可执行 php 文件
你可将 temlpate_c 中的文件全部删除,让 smarty 重新生成
这样错误就不存在了


删除后怎么重新生成?
我其他的地方都没动,删除template_c后,从网页上打开几乎每页都报错,还原之后又好了。

报什么错????

temlpate_c 中的文件是 smarty 根据规则从 temlpate 中的模板文件生成的可执行 php 文件
你可将 temlpate_c 中的文件全部删除,让 smarty 重新生成
这样错误就不存在了


删除重新生成之后,templates文件夹下的tpl文件夹几乎全线飘红。。。。。。是我的模板文件本身代码有问题吗

你不能说些让人听得懂的话吗?

你不能说些让人听得懂的话吗?



就是报错,有红叉
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!