mysql_pconnect 不支持,不建议使用:mysql_pconnect():

i am getting an error during a php execution which i think it was due to a newer php 5.5 thing.

Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /public_html/mydomain.com/connx.php on line 7

Apr 3, 2014

checking

The inner code looks this way

So i thought changing the mysql to mysqli could solve the issue :

$conn = mysqli_pconnect($hostname_conn, $username_conn, $password_conn) or trigger_error("Server Down");

And instead, I'm getting this error... so i guess it was not the correct way of doing so :)

Fatal error: Call to undefined function mysqli_pconnect()

anyhow i can fix this issue ? The code was built long time ago and now i cant really get in touch with him :x

thanks

** UPDATED **

I changed the mysqli_connect and when i load the php script... it shows few errors now... just wondering do i have to change these syntax too ?

mysql_select_db($database_conn);

mysql_query("SET NAMES UTF8");

解决方案Alternatives to this function include:

mysqli_connect() with p: host prefix

So use mysqli_connect, not mysqli_pconnect and modify the host argument as described

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值