- 论坛徽章:
- 0
|
PHP编译的命令:
./configure --with-apxs2=/export/httpd/bin/apxs --enable-sigchild --enable-track-vars --disable-debug --without-gd --with-oci8=/opt/oracle/product --enable-cli --enable-xml
ORACLE 10G:
AMERICAN_AMERICA.ZHS16GBK
SOLARIS 10 中文版
php程序片断:
/*------------------------------------------------------------------------*/
$tablename="tab";
$i=0;
$hm="330";
$hm=strtoupper($hm);
$stmt = OCIParse($conn,"select HM,FD,ADDR from $tablename where hm='$hm'" ;
OCIDefineByName($stmt,"HM",&$hm);
OCIDefineByName($stmt,"FD",&$fd);
OCIDefineByName($stmt,"ADDR",&$addr);
OCIExecute($stmt);
while (OCIFetch($stmt))
{
$hmend[$i]=$hphm;
$fdend[$i]=$fdjh;
$addrend[$i]=$addr;
$i=$i+1;
}
运行结果中文都是????????????,英文,数字都正常。用echo打出来的中文也正常。
同样程序在英文字符集的oracle8i上运行正常,数据库中文能正常显示。
估计是php,oracle连接有问题,怎么办啊? |
|