Home > php教程 > php手册 > body text

php pdo oracle中文乱码 - 周大少

WBOY
Release: 2016-05-20 10:13:14
Original
1380 people have browsed it

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

内容如下在NLS_LANG设置编码

 

<span style="color: #008080;">1</span> ORACLE_HOME=/usr/lib/oracle/<span style="color: #800080;">12.1</span>/<span style="color: #000000;">client64
</span><span style="color: #008080;">2</span> C_INCLUDE_PATH=/usr/include/oracle/<span style="color: #800080;">12.1</span>/<span style="color: #000000;">client64
</span><span style="color: #008080;">3</span> LD_LIBRARY_PATH=$ORACLE_HOME/<span style="color: #000000;">lib
</span><span style="color: #008080;">4</span> <span style="color: #000000;">#remember this is the client NLS_LANG not the server one
</span><span style="color: #008080;">5</span> NLS_LANG=<span style="color: #000000;">FRENCH_FRANCE.UTF8 
</span><span style="color: #008080;">6</span> export ORACLE_HOME LD_LIBRARY_PATH NLS_LANG
Copy after login

 

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

在头部增加

. /etc/profile.d/oracle.<span style="color: #0000ff;">sh<br></span>
Copy after login

. /etc/init.d/functions
. /etc/profile.d/oracle.sh

Copy after login
Copy after login
Copy after login
Copy after login

# Check that networking is up.
. /etc/sysconfig/network

Copy after login
Copy after login
Copy after login
Copy after login

# Additional environment file
if [ -f /etc/sysconfig/php-fpm ]; then
. /etc/sysconfig/php-fpm
fi

Copy after login
Copy after login
Copy after login
Copy after login

if [ "$NETWORKING" = "no" ]
then
exit 0
fi

Copy after login
Copy after login
Copy after login
Copy after login

RETVAL=0
prog="php-fpm"
pidfile=${PIDFILE-/var/run/php-fpm/php-fpm.pid}
lockfile=${LOCKFILE-/var/lock/subsys/php-fpm}

<span style="color: #0000ff;"> </span>
Copy after login

然后重新启动php即可

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template