doutu1889 2013-11-03 20:30
浏览 183
已采纳

如何使用MDB2

I am trying to use MDB2.php. I have downloaded XAMPP with the PHP 5.4 version. I understand that, in order to use MDB2, I need to include it in my PHP file. This is how I am doing it:

My createTable.php file its in C:\Users\Lexy Feito\Desktop\xampp\htdocs\php\COPassig3.

So I use the code:

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

to include the MDB2.php file located in C:\Users\Lexy Feito\Desktop\xampp\php\pear however this is returning the following errors:

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

Could somebody tell me what is the correct way of using MDB2.php to connect to MySQL and why I'm getting this errors?

  • 写回答

1条回答 默认 最新

  • douluan5738 2013-11-03 20:47
    关注

    If you look at those "errors", you will see that they are actually just warnings about old-fashioned ("deprecated" means "discouraged and planned for removal in some future version") or badly-written ("strict standards" just means "could be improved") code in the library.

    The code will carry on running just fine. However, if this library is not currently maintained, you may find that in future you have to either make major changes to it yourself, or move away to a more modern library.

    Check out the error_reporting ini setting and error_reporting() function for how to change which types of messages are displayed or logged.

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

报告相同问题?

悬赏问题

  • ¥15 关于#python#的问题:求帮写python代码
  • ¥15 LiBeAs的带隙等于0.997eV,计算阴离子的N和P
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 来真人,不要ai!matlab有关常微分方程的问题求解决,
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算
  • ¥15 java如何提取出pdf里的文字?