[英]Error with connection with adodb in php
Hello a trying connect to database and i cant do this , i run the program with laragon and show this errors. 您好,尝试连接数据库,但我做不到,我用laragon运行程序并显示此错误。 the database connection is with adodb with mysql.
数据库连接是通过mysql与adodb进行的。 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
What PHP version? 什么PHP版本? I'm assuming 7.x here (possibly) due to the 'deprecated' messages and the last 'fatal' error.
由于“已弃用”消息和最后一个“致命”错误,我在这里假设7.x(可能)。
It's a two part matter... 这是两部分...
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. PHP进行了更改,以使用
__construct()
(两个前导下划线)作为构造函数,而不是使用与类本身相同的名称。 See the PHP 4 style constructors section (first section on the page) for more information. 有关更多信息,请参见PHP 4样式构造器部分(页面的第一部分)。
For example: In the file to ADOConnection has a deprecated constructor...
the constructor likely looks like this: 例如:在
ADOConnection has a deprecated constructor...
的文件中ADOConnection has a deprecated constructor...
该构造函数可能如下所示:
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. 您可以在本地进行更改以解决不推荐使用的消息。
The fatal error: 致命错误:
With PHP 7.x, the mysql_* based functions are removed. 使用PHP 7.x,将删除基于mysql_ *的函数。 See this API info .
请参阅此API信息 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.