drpzr64329 2017-07-18 16:36
浏览 243
已采纳

与php中的adodb连接时出错

Hello a trying connect to database and i cant do this , i run the program with laragon and show this errors. the database connection is with adodb with mysql. Thanks for help.

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADODB_Cache_File has a deprecated constructor in C:\laragon\www\FacturaElectronicaAlumgo\sistema\adodb5\adodb.inc.php on line 233

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADOConnection has a deprecated constructor in C:\laragon\www\FacturaElectronicaAlumgo\sistema\adodb5\adodb.inc.php on line 327

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADORecordSet has a deprecated constructor in C:\laragon\www\FacturaElectronicaAlumgo\sistema\adodb5\adodb.inc.php on line 2854

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADORecordSet_array has a deprecated constructor in C:\laragon\www\FacturaElectronicaAlumgo\sistema\adodb5\adodb.inc.php on line 3872

Fatal error: Uncaught Error: Call to undefined function mysql_pconnect() in C:\laragon\www\FacturaElectronicaAlumgo\sistema\adodb5\drivers\adodb-mysql.inc.php:383 Stack trace: #0 C:\laragon\www\FacturaElectronicaAlumgo\sistema\adodb5\adodb.inc.php(588): ADODB_mysql->_pconnect('localhost', 'root', 'black44265769', 'cal24412_dte') #1 C:\laragon\www\FacturaElectronicaAlumgo\sistema\conexion.php(3): ADOConnection->PConnect('localhost', 'root', 'black44265769', 'cal24412_dte') #2 C:\laragon\www\FacturaElectronicaAlumgo\sistema\validar.php(8): include('C:\\laragon\\www\\...') #3 {main} thrown in C:\laragon\www\FacturaElectronicaAlumgo\sistema\adodb5\drivers\adodb-mysql.inc.php on line 383

</div>
  • 写回答

1条回答 默认 最新

  • dongshao9106 2017-07-18 17:37
    关注

    What PHP version? I'm assuming 7.x here (possibly) due to the 'deprecated' messages and the last 'fatal' error.

    It's a two part matter...

    1. The deprecated:

      PHP has made a change to use __construct() (two leading underscores) as the constructor instead of having the same name as the class itself. See the PHP 4 style constructors section (first section on the page) for more information.

      For example: In the file to ADOConnection has a deprecated constructor... the constructor likely looks like this:

      ADOConnection( ... ); // constructors with or without parameters
      

      ...but all of those can be replaced with:

      __construct( ... );
      

      You can make that change locally to resolve the deprecated messages.

    2. The fatal error:

      With PHP 7.x, the mysql_* based functions are removed. See this API info.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 解决一个加好友限制问题 或者有好的方案
  • ¥15 关于#java#的问题,请各位专家解答!
  • ¥15 急matlab编程仿真二阶震荡系统
  • ¥20 TEC-9的数据通路实验
  • ¥15 ue5 .3之前好好的现在只要是激活关卡就会崩溃
  • ¥50 MATLAB实现圆柱体容器内球形颗粒堆积
  • ¥15 python如何将动态的多个子列表,拼接后进行集合的交集
  • ¥20 vitis-ai量化基于pytorch框架下的yolov5模型
  • ¥15 如何实现H5在QQ平台上的二次分享卡片效果?
  • ¥30 求解达问题(有红包)