简体   繁体   中英

how to install DB.php?

I have use DB::Connect in my program for accessing the database. I ran my php program this shows the error

DB.php file is not their.

require_once 'DB.php';

PEAR::setErrorHandling(PEAR_ERROR_DIE);

Then I copy the DB.php file and PEAR.php file from another machine to my machine after that If I ran from command line it didn't through the error. while running from browser this shows error. How to solve this problem.? How to install this DB.php?

PEAR provides a command line installer that should take care of all the details:

pear install DB

Since PEAR packages are mainly PHP code, you can also copy the files manually, but you must make sure you copy everything, not only the first required file, and your script must also be able to find the files so you must add pear to the include_path PHP directive.

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