Home  >  Article  >  Backend Development  >  thinkphp 标签有关问题 语法 小弟我想在某个标签前 输出{ 该怎么实现

thinkphp 标签有关问题 语法 小弟我想在某个标签前 输出{ 该怎么实现

WBOY
WBOYOriginal
2016-06-13 11:16:43630browse

thinkphp 标签问题 语法 我想在某个标签前 输出{ 该如何实现?
thinkphp 标签问题 语法 我想在某个标签前 输出{ 该如何实现?


本来这个{$ppvod.vod_readurl}在模板中能够解释的解释出为:http://XXXX,但我在其前边 加个  {

就不能正常解释了,直接输出为 {{$ppvod.vod_readurl}。

如何能够输出{ http://XXXX  成这样?


------解决方案--------------------
{{$ppvod.vod_readurl}......
------解决方案--------------------
楼上正解
参考资料:
可以使用literal标签来防止模板标签被解析,例如:



 value1

value2

 value3





上面的if标签被literal标签包含,因此if标签里面的内容并不会被模板引擎解析,而是保持原样输出。

Literal标签可以用于页面的JS代码外面,确保JS代码中的某些用法和模板引擎不产生混淆。
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
Previous article:正则表达式偏题Next article:问上正则的有关问题