- 关键字排名下降处理方法
- 什么是泛型(C#)
- Vue 3 响应式对象:ref 和 reactive 的使用和区别
- css实现强制不换行/自动换行/强制换行
- ASP.NET中Request.InputStream使用
- 在VScode中开启自动换行
- 外贸网站聊天工具需要有哪些功能?
- JavaScript脚本程序的几种基本格式
- 内部链接优化(转)
- C#读取excel数据到datatable中
邮箱:
手机:15383239821
请求变量
请求栾量
use think\facade\Request;
Request::param('name');
Request::param(); 全部请求变量 返回数组
Request::param(['name', 'email'); 多个变量
Request::param('a','1') $a不存在使用默认值1
Request::param('username'," 'strip_tags'); 参数过滤去掉html标签 htmIlspecialchars 转换成实体入库 strtolower 小写
Request::header(); 请求头数组,支持单个cookie
input("name");
Request::session(); 获取$_SESSION变量
Request::cookie(); 获取$_COOKIE变量
Request::server(); 获取$_SERVER变量
Request::env(); 返回env数组
Request::file();获取$_FILES变量
Request::baseUrl(); lindex/index
Request::host(true);域名:www.baidu.com,默认无参数包含端口:80
Request::time() 请求时间戳
Request::app() 应用名index
Request::controller() 控制器Index 参数true小写
Request::action() 操作index参数true小写
Request::method(true); 请求类型获取GET
isGet isPost isPut isDelete isAjax isMobile isHead判断是否某种类型
Request::has('id ,'get'); 检测变量id是否存在,可以使用has方法来检测一个变量参数是否设置
Request::has('name','post'); 检测是否有post过来的name,返回ture或者false
ur('index/hello#aa'); 锚点
Cache::set('name', $value, 3600); 1小时后过期
Cache::get('name'); 获取缓存
- 上一篇:php中的超全局变量
- 下一篇:thinkphp:thinkphp6速查手册
-
2013-10-28访问网站提示需要输入用户名密码
-
2022-05-15ApplicationHost.config文件被破坏导致IIS崩溃
-
2023-05-17代码中 #ifdef注释方法的使用
-
2010-10-02break和continue语句
-
2023-09-21PHP 中超级全局变量
-
2022-05-08C# 实现保留两位小数的方法
