中文天堂在线播放|777超碰|亚洲男人天堂手机版|露水红颜电影未删减完整版,简单任务国语高清在线观看完整版,成人xxxxx,日本aa在线

ThinkPHP中redirect用法實(shí)例分析

時間:2025-11-03 05:52:41 php語言

ThinkPHP中redirect用法實(shí)例分析

  ThinkPHP中redirect如何使用,下面是小編給大家提供的ThinkPHP中redirect用法實(shí)例分析,大家可以參考閱讀,更多詳情請關(guān)注應(yīng)屆畢業(yè)生考試網(wǎng)。

  redirect 重定向的通用語法為:redirect(url,params=array(),delay=0,msg=''),假設(shè)當(dāng)前為默認(rèn) HOME分組 Aritcle模塊 insert操作,一些例子如下:

  代碼如下:

  /pic/p>

  $this->redirect('edit');

  /pic/p>

  $this->redirect('User/edit');

  /pic/p>

  $this->redirect('Admin/');

  /pic/p>

  $this->redirect('Admin-Index/view');

  /pic/p>

  $this->redirect('Admin-Index/view', array('uid'=>1), 3,'頁面跳轉(zhuǎn)中~')

  /pic/p>

  $this->redirect('OtherApp:/pic/view');

  同項(xiàng)目分組中的URL訪問一樣,redirect 中跨分組跳轉(zhuǎn)只是多了一個分組項(xiàng)目名稱的概念.

  提示:可以在 redirect 中使用路由,redirect 方法的參數(shù)用法和 U函數(shù) 的用法一致.可參考 U函數(shù) 生成URL地址相關(guān)部分內(nèi)容.

  希望本文所述對大家基于ThinkPHP的PHP程序設(shè)計(jì)有所幫助。

【ThinkPHP中redirect用法實(shí)例分析】相關(guān)文章:

分析thinkphp常見路徑用法分析02-28

php中return的用法實(shí)例分析10-12

Java中的多態(tài)用法實(shí)例分析12-03

php中fsockopen用法實(shí)例11-07

ThinkPHP中自動驗(yàn)證11-05

Java中的MessageFormat.format用法實(shí)例02-01

C語言double和float 實(shí)例分析用法01-13

ThinkPHP實(shí)現(xiàn)支付寶接口功能實(shí)例08-27

php中引用的用法分析03-04