gpt4 book ai didi

php - MDB2 的使用方法

转载 作者:可可西里 更新时间:2023-11-01 08:06:03 25 4
gpt4 key购买 nike

我正在尝试使用 MDB2.php。我已经下载了 PHP 5.4 版本的 XAMPP。我知道,为了使用 MDB2,我需要在我的 PHP 文件中包含它。我就是这样做的:

我的 createTable.php 文件位于 C:\Users\Lexy Feito\Desktop\xampp\htdocs\php\COPassig3

所以我使用代码:

require "../../../php/pear/MDB2.php";

包含位于 C:\Users\Lexy Feito\Desktop\xampp\php\pear 中的 MDB2.php 文件,但是这会返回以下错误:

Deprecated: Assigning the return value of new by reference is deprecated in C:\Users\Lexy Feito\Desktop\xampp\php\pear\MDB2.php on line 390

Deprecated: Assigning the return value of new by reference is deprecated in C:\Users\Lexy Feito\Desktop\xampp\php\pear\MDB2.php on line 1885 Deprecated: Assigning the return value of new by reference is deprecated in C:\Users\Lexy Feito\Desktop\xampp\php\pear\MDB2.php on line 2572

Deprecated: Assigning the return value of new by reference is deprecated in C:\Users\Lexy Feito\Desktop\xampp\php\pear\MDB2.php on line 2595

Deprecated: Assigning the return value of new by reference is deprecated in C:\Users\Lexy Feito\Desktop\xampp\php\pear\MDB2.php on line 2940

Strict Standards: Declaration of MDB2_Driver_Common::raiseError() should be compatible with & PEAR::raiseError($message = NULL, $code = NULL, $mode = NULL, $options = NULL, $userinfo = NULL, $error_class = NULL, $skipmsg = false) in C:\Users\Lexy Feito\Desktop\xampp\php\pear\MDB2.php on line 990

有人可以告诉我使用 MDB2.php 连接到 MySQL 的正确方法是什么以及为什么我会收到此错误?

最佳答案

如果你查看那些“错误”,你会发现它们实际上只是关于过时的警告(“弃用”意味着“不鼓励并计划在未来的某个版本中删除”)或写得不好(“严格的标准” "只是意味着“可以改进”)库中的代码。

代码将继续正常运行。 但是,如果当前未维护此库,您可能会发现将来您必须自己对其进行重大更改,或者转移到更现代的库。

查看 the error_reporting ini settingerror_reporting() function了解如何更改显示或记录的消息类型。

关于php - MDB2 的使用方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19757737/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com