请教关于PHP 中文参数传递的问题

各位师傅好,请教下关于PHP中中文传递的问题。PHP部分<?phprequire'include/common.inc.php';includetpl("city");?... 各位师傅好,请教下关于PHP中中文传递的问题。
PHP 部分
<?phprequire 'include/common.inc.php';
include tpl("city");?>
获取页面模板
{:tpl header}
<div class="content_main">
<div class="content_left">
<div class="posation"><span style="float:right">当前所在位置:<a href="{:$set_url}">首页</a>>><!--{:loop $gpos $v}--><a href="{:$v['url']}">{:$v['name']}>></a><!--{:/loop}--></span><h1>{:$gcategory[$catid][name]}</h1></div>
<div class="list_content" id="listcontent">

<div class="list_content">
<ul>
{:get sql="SELECT * FROM ybyjls_album where defaultpicurl!='' AND `catid`=27 and city=$city and recycle=0 ORDER BY id DESC",rows="4"}
<table width="730" border="0" align="center" cellpadding="0" cellspacing="5" style="margin-bottom:10px; border:1px solid #ccc">
<tr>
<td width="98" rowspan="2" valign="top"><a href="{:$r['url']}" title="{:$r['title']}" ><img src="{:$r['defaultpicurl']}" alt="{:$r['title']}" width="80" height="60" /></a></td>
<td width="617" valign="top"><strong><a href="{:$r['url']}" title="{:$r['title']}"><span {:$r[color]}>{:tag_cut($r['title'],24,1)}</span></a></strong></td>
</tr>
<tr>
<td valign="top"><a href="{:$r['url']}" title="{:$r['title']}">{:tag_cut($r['description'],120,1)}</a></td>
</tr>
</table>
{:/get}
</ul>
<!--分页-->
<div class="feny">das</div>
<div style="clear:both"></div>
<!--end-->

</div>
</div>
<div style="clear:both"> </div>

</div>
<!--end main-->
<div class="content_right">{:tpl side}</div>
<div style="clear:both"> </div>
</div>

{:tpl footer}

希望各位老师能帮忙,谢谢,该页面获取的是 catid和 city 城市,其中城市无法获取
展开
 我来答
pw2007pw
2013-01-16 · TA获得超过532个赞
知道小有建树答主
回答量:316
采纳率:66%
帮助的人:116万
展开全部
中文传递在php的POST 传递中比较ok 因为是底层帮你转码了。主要问题出现在GET 方式传递中文。需要手动转一下编码 $中文 = iconv("gb2312","UTF-8",$中文);
匿名用户
2013-01-14
展开全部
看的头晕。

中文参数。URL,可以做一个urlencode传送啊。
其它POST并不需要做特殊处理。
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
ExpressPanda
2013-01-15
知道答主
回答量:12
采纳率:0%
帮助的人:4.4万
展开全部
urlencode() 和 urldecode()
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 更多回答(1)
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式