Home > Backend Development > PHP Tutorial > 新手求教下 PHP PEAR DB 的问题

新手求教下 PHP PEAR DB 的问题

WBOY
Release: 2016-06-23 13:53:45
Original
975 people have browsed it

比如

include "DB.php";
$r = DB::connect("mysql://root:pw@localhost/dbname");
var_dump($r);


程序中 的
include "DB.php";
这个路径需要改么?

我安装好了 PEAR DB 以及 go-pear.phar php-mysql
仍然提示错误 找不到 DB.php

如果更改程序中的路径
无错误提示 无输出

求教 
这个到底怎么弄? 还有 是不是安装的时候有什么说法?


回复讨论(解决方案)

那是你没有安装好
PEAR 要求把 pear 安装路径写在 include_path 中的

我放弃治疗了... 
直接在代码中 set_include_path 了

个人感觉不应该是修改代码的...

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template