码迷,mamicode.com
首页 > Web开发 > 详细

url传参及重定向

时间:2018-10-24 15:15:00      阅读:184      评论:0      收藏:0      [点我收藏+]

标签:ram   数据   接收   his   bsp   重定向   php   post   传参   

成功跳转
$this -> success(‘提示语‘,跳转路径,返回的数据,时间,发送的 Header 信息)
跳转失败
$this -> error(‘提示语‘,跳转路径,返回的数据,时间,发送的 Header 信息)


重定向跳转

$this ->redirect(路径, 传参数, http协议状态值, 隐式传参)

 

接收数据或者参数
use think\Request;

$requet = request();
接收路由上的参数
$requet -> route(‘名字‘)
接收所有的数据
$requet -> param(‘名字‘)
form get提交数据
$requet -> get(‘名字‘)
form post提交数据
$requet -> route(‘名字‘)

路由
use think\Route;

配置文件route.php
的return 里面加入数据如: ‘hhhhh‘ => ‘index/Kkk/page‘,

url传参及重定向

标签:ram   数据   接收   his   bsp   重定向   php   post   传参   

原文地址:https://www.cnblogs.com/xxpdethingkabout/p/9842573.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!