[英]Error with connection with adodb in php
您好,尝试连接数据库,但我做不到,我用laragon运行程序并显示此错误。 数据库连接是通过mysql与adodb进行的。 感谢帮助。
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
什么PHP版本? 由于“已弃用”消息和最后一个“致命”错误,我在这里假设7.x(可能)。
这是两部分...
不推荐使用:
PHP进行了更改,以使用__construct()
(两个前导下划线)作为构造函数,而不是使用与类本身相同的名称。 有关更多信息,请参见PHP 4样式构造器部分(页面的第一部分)。
例如:在ADOConnection has a deprecated constructor...
的文件中ADOConnection has a deprecated constructor...
该构造函数可能如下所示:
ADOConnection( ... ); // constructors with or without parameters
...但是所有这些都可以替换为:
__construct( ... );
您可以在本地进行更改以解决不推荐使用的消息。
致命错误:
使用PHP 7.x,将删除基于mysql_ *的函数。 请参阅此API信息 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.