简体   繁体   中英

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

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!

You need to install the module:

pear install DB

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM