例如 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>';