标题:[实践Ok]Mysql连接升级为Mysqli函数对应关系以解决The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in 报错 出处:向东博客 专注WEB应用 构架之美 --- 构架之美,在于尽态极妍 | 应用之美,在于药到病除 时间:Fri, 12 Feb 2016 20:10:36 +0000 作者:jackxiang 地址:http://jackxiang.com/post/8498/ 内容: 解决Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: mysqli 更严谨 安全 高效 php 5个版本,5.2、5.3、5.4、5.5,怕跟不上时代,新的服务器直接上5.5,但是程序出现如下错误:Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in,看意思就很明了,说mysql_connect这个模块将在未来弃用,请你使用mysqli或者PDO来替代。 解决方法1: 禁止php报错 display_errors = On 改为 display_errors = Off 鉴于这个服务器都是给用户用的,有时候他们需要报错(…都是给朋友用的,^_^),不能这做,让他们改程序吧,看方案2. 解决方法2: mysqli_select_db: 来自:http://www.runoob.com/php/func-mysqli-select-db.html 用mysqli的函数连接mysql出现warning: mysqli::real_connect(): (hy000/1040): too many connections in : https://jackxiang.com/post/8500/ Generated by Jackxiang's Bo-blog 2.1.1 Release