解决MYSQL弃用模块错误Deprecated: mysql_query(): The mysql extension is deprecated and will be removed in the future
今天使用了mysql 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程序代码里面设置报警级别
<?php
error_reporting = E_ALL & ~E_DEPRECATED
方法2:禁止php报错
display_errors = On 改为 display_errors = Off
方法3:使用mysqli或者PDO
建议大家尽快取消mysql,全部都走向mysqli或者PDO等等。mysql确实是太不安全而且太老旧了。
解决MYSQL弃用模块错误Deprecated: mysql_query(): The mysql extension is deprecated and will be removed in the future的更多相关文章
- mysql5.5提示Deprecated: mysql_query(): The mysql extension is deprecated
解决方法1:在php程序代码里面设置报警级别 <?php error_reporting = E_ALL & ~E_DEPRECATED 方法2:禁止php报错 display_erro ...
- 解决 Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in
转载 php 5个版本,5.2.5.3.5.4.5.5,怕跟不上时代,新的服务器直接上5.5,但是程序出现如下错误:Deprecated: mysql_connect(): The mysql ext ...
- 解决Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future:
php 5个版本,5.2.5.3.5.4.5.5,怕跟不上时代,新的服务器直接上5.5,但是程序出现如下错误:Deprecated: mysql_connect(): The mysql extens ...
- 解决Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in
php 5个版本,5.2.5.3.5.4.5.5,怕跟不上时代,新的服务器直接上5.5,但是程序出现如下错误:Deprecated: mysql_connect(): The mysql extens ...
- 错误Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future:
今天写PHP代码,遇到了这个非常不友好的报错(Deprecated: mysql_connect(): The mysql extension is deprecated and will be re ...
- PHP提示Deprecated: mysql_connect(): The mysql extension is deprecated的解决方法
这篇文章主要介绍了PHP提示Deprecated: mysql_connect(): The mysql extension is deprecated的解决方法,是在进行PHP数据库程序开发中常会遇 ...
- 浅析Mysql 数据回滚错误的解决方法
介绍一下关于Mysql数据回滚错误的解决方法.需要的朋友可以过来参考下 MYSQL的事务处理主要有两种方法.1.用begin,rollback,commit来实现begin 开始一个事务rollbac ...
- 浅析Mysql数据回滚错误的解决方法
介绍一下关于Mysql数据回滚错误的解决方法.需要的朋友可以过来参考下 MYSQL的事务处理主要有两种方法. 1.用begin,rollback,commit来实现 begin 开始一个事 ...
- 解决Lost connection to MySQL server during query错误方法
昨天使用Navicat for MySQL导入MySQL数据库的时候,出现了一个严重的错误,Lost connection to MySQL server during query,字面意思就是在查询 ...
随机推荐
- Python学习笔记九-文件读写
1,读取文件: f=open('目录','读写模式',encoding='gbk,error='egiong') 后三项可以不写但是默认是' r'读模式:open函数打开的文件对象会自动加上read( ...
- R语言数据处理
写在前面:数据处理是数据分析与挖掘必不可少的步骤.下面列出一些常用的数据处理操作. 一.类型转换 用class()查看数据的类型,用as.类型名()进行类型转换. > num <- as. ...
- iframe和response.sendRedirect使用的问题
一.iframe下使用response.sendRedirect的问题 一般使用filter过滤用户是否登录,如果用户没有登陆则转向登陆页面,这时候可以使用response.sendRedirect( ...
- Scala学习笔记--抽象成员
package com.evor.test1 class Test1 { } object Test1{ def main(args:Array[String]):Unit = { //类参数和抽象字 ...
- scala学习笔记-Demo存档
class Thermomenter{ var celsius :Float = _; //将变量设置为缺省值'_',这个符号指定了变量的初始化值 //对数值类型来说是0,布尔类型是false,引用类 ...
- 给config加密
Configuration config = WebConfigurationManager.OpenWebConfiguration("/"); ConfigurationSec ...
- Unity3D 定时发射子弹
using UnityEngine; public class example : MonoBehaviour { public GameObject projectilePrefab; public ...
- a:hover和a:visited书写顺序的重要性
2a:hover和a:visited书写顺序的重要性今天在用a:hover属性的时候发现一个奇怪的问题,同一个页面里面有些链接的a:hover效果不能正常表现出来.链接的代码是一样,没有使用其它样式固 ...
- android run process
http://www.jb51.net/article/32798.htm http://www.elecfans.com/tongxin/119/20120315263977.html 图 1 详细 ...
- Qt HTTP请求同步调用
在Qt中,进行HTTP就行现在官方提倡使用QNetworkAccessManager,其和QNetworkRequest和QNetworkReply配合使用,来完成,其是只支持异步的操作.最近使用QM ...