在php中怎么用js跳转页面跳转,在php中怎么用redirect实现页面跳转?
1、thinkPHP?的Action類的redirect方法可以實(shí)現(xiàn)頁(yè)面的重定向功能,redirect 重定向的通用語(yǔ)法為:edirect(url,params=array(),delay=0,msg='') //?跳轉(zhuǎn)到?edit?操作 ?$this->redirect('edit')。
2、//?跳轉(zhuǎn)到?UserAction下的edit?操作?this->redirect('User/edit'),//?跳轉(zhuǎn)到?Admin分組默認(rèn)模塊默認(rèn)操作$this->redirect('Admin/')。3、//?跳轉(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)。
4、同項(xiàng)目分組中的URL訪問(wèn)一樣,redirect 中跨分組跳轉(zhuǎn)只是多了一個(gè)分組項(xiàng)目名稱的概念,可以在 redirect 中使用路由,redirect 方法的參數(shù)用法和 U函數(shù)?的用法一致,可參考 U函數(shù)?生成URL地址相關(guān)部分內(nèi)容。
創(chuàng)作挑戰(zhàn)賽新人創(chuàng)作獎(jiǎng)勵(lì)來(lái)咯,堅(jiān)持創(chuàng)作打卡瓜分現(xiàn)金大獎(jiǎng)總結(jié)
以上是生活随笔為你收集整理的在php中怎么用js跳转页面跳转,在php中怎么用redirect实现页面跳转?的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: Linux快捷键的使用
- 下一篇: php session警告屏蔽,PHP