ThinkPhp 3.2 U函数,入口文件跳转方法

例如 admin.php 利用 U 方法跳转到 index.php 中,默认是不可以的.


我的这个方法,不用修改thinkphp的系统文件:
str_ireplace(_PHP_FILE_,'/入口文件',U('User/blog',array('uid'=>$data['blog_id'])))


例子:
$list[$key]['blog_id']=' <a title="" href="'.str_ireplace(_PHP_FILE_,'/index.php',U('User/blog',array('uid'=>$data['blog_id']))).'" >tntblog</a>';

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章