https://blog.csdn.net/u014520745/article/details/52029411

 

 

在ThinkPHP/Library/Think/View.class.php 输出模板内容之前,加上字符替换行为,即在:第130附近的fetch() 方法中修改:

修改前:


// 获取并清空缓存
$content = ob_get_clean();
// 内容过滤标签
Hook::listen('view_filter',$content);
// 输出模板文件
return $content;

修改后:

// 获取并清空缓存
$content = ob_get_clean();
// 内容过滤标签
Hook::listen('view_filter',$content);
//修改
Hook::listen('template_filter',$content);
// 输出模板文件
return $content;

然后就可以使用系统的一些定义好的常量了

<h1>__PUBLIC__</h1>
<h1>__URL__</h1>

---------------------

https://www.cnblogs.com/anxiaoyu/p/6897550.html

 http://www.bubuko.com/infodetail-2134665.html

thinkphp3.2使用分页

https://www.cnblogs.com/tianguook/p/4326613.html

相关文章:

  • 2021-09-27
  • 2023-04-07
  • 2023-04-07
  • 2021-05-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-01-03
  • 2021-08-04
  • 2021-07-24
  • 2022-12-23
  • 2021-04-12
  • 2022-03-09
  • 2021-11-08
相关资源
相似解决方案