光明给我的QQ历史签名程序.可是我加了远程读取用户昵称的调试的时候是乱码的,而昵称是相当正常.搞了很久,我觉得是php版本的问题.一查,果然有这种情况.
php 5读取xml的时候,是以utf-8的,而那个昵称的页面是gb2312的,所以读取的时候出现了乱码.光明用iconv把gb的网页内容转化为utf-8再读取后页面就正常了.神奇的php 5
23
May
光明给我的QQ历史签名程序.可是我加了远程读取用户昵称的调试的时候是乱码的,而昵称是相当正常.搞了很久,我觉得是php版本的问题.一查,果然有这种情况.
php 5读取xml的时候,是以utf-8的,而那个昵称的页面是gb2312的,所以读取的时候出现了乱码.光明用iconv把gb的网页内容转化为utf-8再读取后页面就正常了.神奇的php 5
23
May
官方文档写得很简单.它给的例子没那么简单了:
url.rewrite-once = ( “^/id/([0-9]+)$” => “/index.php?id=$1″,
“^/link/([a-zA-Z]+)” => “/index.php?link=$1″ )# the following example, is, however just simulating vhost by rewrite
# * you can never change document-root by mod_rewrite
# use mod_*host instead to make real mass-vhost# request: http://any.domain.com/url/
# before rewrite: REQUEST_URI=”/www/htdocs/url/”
# and DOCUMENT_ROOT=”/www/htdocs/” %0=”any.domain.com” $1=”url/”
# after rewrite: REQUEST_URI=”/www/htdocs/any.domain.com/url/”
# still, you have DOCUMENT_ROOT=/www/htdocs/server.document-root = “/www/htdocs/”
$HTTP["host"] =~ “^.*\.([^.]+\.com)$” [...]

comment