PHP-PEAR require_once('DB.php');

拈花ヽ惹草 提交于 2019-12-19 10:37:09

问题


I've a problem with PEAR (PHP). This is the error:

Warning: require_once(DB.php): failed to open stream: No such file or directory in /WWW/xxx.php on line 2
Fatal error: require_once(): Failed opening required 'DB.php' (include_path='.:/usr/share/php:/usr/share/pear') in /WWW/xxx.php on line 2

I've already installed PEAR (version 1.9.0) In my PHP file the first two lines are these:

1- <?php
2- require_once('DB.php');

Where's the problem? Thank you all!


回答1:


You need to install the module:

pear install DB

Although this page gives a warning about this package being superseded (not deprecated) by MDB2.




回答2:


You can also install module without using pear:

With Fedora/CentOS:

  • yum install php-pear-DB

With Debian/Ubuntu:

  • apt-get install php-db

-- Dario



来源:https://stackoverflow.com/questions/8036603/php-pear-require-oncedb-php

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!