爱玺玺

爱玺玺的生活日记本。wx:lb87626

ThinkPHP获取get参数

<a href="{#$smarty.const.__CONTROLLER__#}/manedit/mg_id/{#$v.mg_id#}">修改</a>


mg_id就是参数名。{#$v.mg_id#}参数值。


控制器方法获取参数值

function manedit($mg_id){

echo $mg_id;

$this->display();

}


方法里面形参$mg_id将获取get传过来的参数。

发表评论:

Powered By Z-BlogPHP 1.4 Deeplue Build 150101

Copyright Your WebSite.Some Rights Reserved.

蜀ICP备11021721号-5