当前位置: 移动技术网 > IT编程>开发语言>PHP > php pdo oracle中文乱码的快速解决方法

php pdo oracle中文乱码的快速解决方法

2017年12月12日  | 移动技术网IT编程  | 我要评论

沧月博客,运动员加油词,妖孽传

在/etc/profile.d/简历oracle.sh

内容如下在nls_lang设置编码

oracle_home=/usr/lib/oracle/12.1/client64
c_include_path=/usr/include/oracle/12.1/client64
ld_library_path=$oracle_home/lib
#remember this is the client nls_lang not the server one
nls_lang=french_france.utf8 
export oracle_home ld_library_path nls_lang

然后修改 /etc/init.d/php-fpm

在头部增加

. /etc/profile.d/oracle.sh

. /etc/init.d/functions
. /etc/profile.d/oracle.sh
# check that networking is up.
. /etc/sysconfig/network
# additional environment file
if [ -f /etc/sysconfig/php-fpm ]; then
. /etc/sysconfig/php-fpm
fi
if [ "$networking" = "no" ]
then
exit 0
fi
retval=0
prog="php-fpm"
pidfile=${pidfile-/var/run/php-fpm/php-fpm.pid}
lockfile=${lockfile-/var/lock/subsys/php-fpm}

然后重新启动php即可

以上这篇php pdo oracle中文乱码的快速解决方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持移动技术网。

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网