install pear for PHP in Windows

The Pear is not installed when you install php5. You must install it separately. Go to PHP directory, find go-pear.bat, and setup it.

when it complete, the pear is installed.

If you want to install other modual, such as db.  You can install it in CMD with command: pear install db.

To test if db work:

<?php
require_once ”DB.php”;

//connect to database

$dsn = ‘mysql://root:@localhost/test;

$db = & DB::connect($dsn);

if (PEAR::isError($db)) {

die($db->getMessage());

}

?>

other pear command:

http://www.wenhq.com/article/view_441.html

此条目发表在 忙里偷闲 分类目录。将固定链接加入收藏夹。

install pear for PHP in Windows》有 1 条评论

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

*

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>