av手机免费在线观看,国产女人在线视频,国产xxxx免费,捆绑调教一二三区,97影院最新理论片,色之久久综合,国产精品日韩欧美一区二区三区

php語言

ThinkPHP中redirect用法實例分析

時間:2025-02-08 04:34:42 php語言 我要投稿
  • 相關(guān)推薦

ThinkPHP中redirect用法實例分析

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

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

  代碼如下:

  // 跳轉(zhuǎn)到 edit 操作

  $this->redirect('edit');

  // 跳轉(zhuǎn)到 UserAction下的edit 操作

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

  // 跳轉(zhuǎn)到 Admin分組默認(rèn)模塊默認(rèn)操作

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

  // 跳轉(zhuǎn)到 Admin分組Index模塊view操作

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

  // 跳轉(zhuǎn)到 Admin分組Index模塊view操作,uid參數(shù)為1,延遲3秒跳轉(zhuǎn)

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

  // 跳轉(zhuǎn)到 其他OtherApp項目(非分組)的Admin項目分組User模塊view操作

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

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

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

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

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

分析thinkphp常見路徑用法分析10-29

Java中的多態(tài)用法實例分析10-23

php中return的用法實例分析10-27

php中fsockopen用法實例06-20

Java中的MessageFormat.format用法實例10-23

C語言double和float 實例分析用法06-14

ThinkPHP中自動驗證07-26

ThinkPHP實現(xiàn)支付寶接口功能實例09-04

php中引用的用法分析06-22