Blogger Information
Blog 28
fans 0
comment 0
visits 65289
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
如何获取thinkphp的版本号
蒸蒸
Original
920 people have browsed it

有两种方式:
方法一、在模板中
直接使用 {$Think.VERSION} 即可显示当前ThinkPHP版本号

方法二、在控制器中
可通过\think\facade\App::version(); 获取当前ThinkPHP版本号

  1. 例如:在控制器获取thinkphp版本号并显示在模板中

$tv=\think\facade\App::version();
$this->assign(‘tv’,$tv);

  1. <div>
  2. <p>{$tv}</p>
  3. </div>
  4. 以上内容适用于tp5,参考自http://www.thinkphp.cn/topic/60244.html
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post