1)怎样才能在PHP code 中显示汉字? in my httpd.conf, I setup the config like this:
AddDefaultCharset GB2312, should I config the php.ini to user mbstring ?
2)in talking with mysql (charset=uft-8), how can I convert the php variable to match with the mysql charset (e.g below:)
<?php
$name=' 正文';
$sql=" select * from some_tab where name=\'".$name."\'";
$sql= stripslashes($sql);
...
//talk to database, problem is mysql my not recognize the ' 正文'
...
?>
Thanks in advance!
AddDefaultCharset GB2312, should I config the php.ini to user mbstring ?
2)in talking with mysql (charset=uft-8), how can I convert the php variable to match with the mysql charset (e.g below:)
<?php
$name=' 正文';
$sql=" select * from some_tab where name=\'".$name."\'";
$sql= stripslashes($sql);
...
//talk to database, problem is mysql my not recognize the ' 正文'
...
?>
Thanks in advance!