当前位置:网站首页>pbootcms的if判断失效直接显示标签怎么回事?
pbootcms的if判断失效直接显示标签怎么回事?
2022-06-12 16:19:00 【于飞SEO】
使用pbootcms建站在处理详情内容做判断的时候,有时会出现判断失效的奇怪情况,直接显示标签代码。在一些其他地方判断极小概率也会碰到,这是为什么呢?
例如报错:
程序运行异常: syntax error, unexpected '=',位置:/apps/home/controller/ParserController.php(3310) : eval()'d code,第1行。
碰到这种情况首先检查是否判断的条件里含有了程序过滤的特殊字符,含有的话会使判断失效。
过滤特殊字符串处理在\apps\home\controller\ParserController.php中:
问题案例
如下图判断的时候前台失效,直接显示了标签代码。检查判断条件中含有Evaluate触发了eval字符过滤导致。
解决办法
既然是含有了不该出现的字符,那就想办法不要拿含有这个字符的内容去判断。这里就可以使用到长度截取标签了,我们可以截取几个字符去作为条件判断。
因此只要在判断条件上增加截取标签,例如:
原来的条件是{content:content},改为{content:content len=2} 即可。
边栏推荐
- Global and Chinese market for material injection 2022-2028: Research Report on technology, participants, trends, market size and share
- acwing 803. Interval merging
- 批量--03---CmdUtil
- Step by step steps to create an ABAP program with a custom screen
- 大规模实时分位数计算——Quantile Sketches 简史
- Solution to idea Chinese prism garbled code error -- console Chinese output prism garbled code
- 【DSP视频教程】DSP视频教程第8期:DSP库三角函数,C库三角函数和硬件三角函数的性能比较,以及与Matlab的精度比较(2022-06-04)
- <山东大学项目实训>渲染引擎系统(七)
- Multimix:从医学图像中进行的少量监督,可解释的多任务学习
- The C Programming Language(第 2 版) 笔记 / 8 UNIX 系统接口 / 8.1 文件描述符
猜你喜欢
统计机器学习代码合集
< 山东大学软件学院项目实训 > 渲染引擎系统——基础渲染器(六)
leetcode-54. Spiral matrix JS
Super detailed dry goods! Docker+pxc+haproxy build a MySQL Cluster with high availability and strong consistency
acwing 797 差分
Sum of acwing796 submatrix
Analysis of China's cargo transport volume, cargo transport turnover and port cargo in 2021 [figure]
Solution to idea Chinese prism garbled code error -- console Chinese output prism garbled code
超详细干货!Docker+PXC+Haproxy搭建高可用强一致性的MySQL集群
Project training of Software College of Shandong University rendering engine system point cloud processing (10)
随机推荐
Development status of China's pig breeding industry in 2021 and comparative analysis of key enterprises: 671million pigs were sold [figure]
盒马,最能代表未来的零售
Multimix: small amount of supervision from medical images, interpretable multi task learning
acwing795 前缀和(一维)
acwing 790. The cubic root of a number (floating-point number in half)
看《梦华录》上头的人都该尝试下这款抖音特效
【摸鱼神器】UI库秒变LowCode工具——列表篇(一)设计与实现
联通网管协议框图
5-5配置Mysql复制 基于日志点的复制
In 2020, the demand for strain sensors in China will reach 9.006 million, and the market scale will reach 2.292 billion yuan [figure]
Read MHD and raw images, slice, normalize and save them
The C Programming Language(第 2 版) 笔记 / 8 UNIX 系统接口 / 8.5 实例(fopen 和 getc 函数的实现)
When programming is included in the college entrance examination...
Reprise de Google net
(四)GoogleNet複現
acwing 2816. 判断子序列
Cookie 和 Session
Saga architecture pattern: implementation of cross service transactions under microservice architecture
Acwing795 prefix sum (one dimension)
《安富莱嵌入式周报》第268期:2022.05.30--2022.06.05