偶知道了--enable-mbstring : Enable mbstring functions. This option is required to use mbstring functions. 注: As of PHP 4.3.0, the option --enable-mbstring will be enabled by default and replaced with --with-mbstring[=LANG] to support Chinese, Korean and Russian language support. Japanese character encoding is supported by default. If --with-mbstring=cn is used, simplified chinese encoding will be supported. If --with-mbstring=tw is used, traditional chinese encoding will be supported. If --with-mbstring=kr is used, korean encoding will be supported. If --with-mbstring=ru is used, russian encoding will be supported. If --with-mbstring=all is added, all supported character encoding in mbstring will be enabled, but the binary size of PHP will be maximized because of huge Unicode character maps. Note that Chinese, Korean and Russian encoding is experimentally supported in PHP 4.3.0. 手机传过来的是utf-8编码,php重新编译后用 string mb_convert_encoding ( string str, string to-encoding [, mixed from-encoding])
采用一种编码,比如说是base64编码,然后再解码, 看这样可不可以。
===================
建议用 Unicode
$data="http://localhost/zshang.php?func=xianxi&fenid=2&id=20";
$j=base64_encode($data);
echo "base64_encode的加密:".$j;
$j1=base64_decode($j);
echo "<hr>base64_decode的解密:".$j1;
//_本人特意为你写的!!看你有没用!!!64位编码
$str=urlencode($data);
echo "<hr>编码加密:".$str;
$str1=urldecode($str);
echo "<hr>编码解密:".$str1;
//__URL编码你看哪个好用吧!!!!
//__我已在自已机上测试过了!!!!
?>
<p>传递变量:
<do type="accept" label="OK">
<go href="ok.php" method="post">
<postfield name="myname" value="<?=base64_encode("我是变量");?>"/>
</go>
</do>
</p>
Next Page
<p>myname is:<?=base64_decode($myname);?>
</p>http://expert.csdn.net/Expert/topic/2114/2114876.xml?temp=.6523859
代码如下:
<wml>
<card id="monternet" title="test">
<?php echo(gb2u("请输入服务名称:"));?><input name="a" maxlength="50" /><br/>
<anchor>[<?php echo(gb2u("开始搜索"));?> ]
<go href="http://XXX/search/result.wml" method="post">
<postfield name="name" value="$a" />
</go>
</anchor>
<a href="http://wap.monternet.com"><?php echo(gb2u("[返回]")); ?></a>
</p>
</card>
</wml>问题:怎样在将$a进行base64编码?
base64_encode($_POST['$a']);
base64_encode($_POST["\$a"]);
string mb_convert_encoding ( string str, string to-encoding [, mixed from-encoding])