One - One Code All

Blog Content

thinkphp6测试有效,前端模板常用方法

PHP   2023-07-02 22:34:04

IP地址:

{$Request.ip}

tp版本:

{:think\\App::VERSION}

控制器名称:

{$Request.controller}

session变量:

{$Request.session.mch_id}

GET/POST传参:

{$Request.param.cw_id}

控制器里,方法名称:

{$Request.action}

域名,主机名:

{$Request.host}

URL参数

{$_SERVER['REQUEST_URI']}



上一篇:thinkphp8单次访问需要多次操作数据库导致各种查询条件累加问题,newQuery

The minute you think of giving up, think of the reason why you held on so long.