今天使用TP5.1的路由传参,传递小数获取后总是会变成整数。后来看手册的变量规则才解决这个问题: 最开始定义的路由:
Route::get('api/:id','api/index/banner');
访问:http://project.com/api/12.05 结果:12
修改后的路由
Route::get('api/:id','api/index/banner',[],['id'=>'[0-9.]+']);
结果就能正常获取
今天使用TP5.1的路由传参,传递小数获取后总是会变成整数。后来看手册的变量规则才解决这个问题: 最开始定义的路由:
Route::get('api/:id','api/index/banner');
访问:http://project.com/api/12.05 结果:12
修改后的路由
Route::get('api/:id','api/index/banner',[],['id'=>'[0-9.]+']);
结果就能正常获取
1.链路聚合的基本概念2.链路聚合的配置
author:咔咔 request()->ip()
5.1版本开始,官网不再提供下载版本,请使用Composer或者gi
最好配置跳转地址为自己设定的 在根目录下创建一个tpl文件夹。 避免每次升级thinkphp都会把跳转给覆盖了。
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M