You are here: Re: PEAR doesn't seem to be working « PHP Programming Language « IT news, forums, messages
Re: PEAR doesn't seem to be working

Posted by Schluppy on 01/25/07 06:36

On Wed, 24 Jan 2007 07:49:52 -0800, Charles wrote:

> I installed PHP with PEAR support on my Windows computer. I tried the
> snippet of the book "Learning PHP5":
>
> <?php
> error_reporting(E_ERROR | E_WARNING | E_PARSE);
> echo "test";
> include 'DB.php';
> $db = DB::connect('mysql://penguin:top^hat@db.example.com/restaurant');
> if (DB::isError($db)) { die("Can't connect: " . $db->getMessage( )); }
> ?>
>
> But it only prints "test", it should display an error message saying
> it's not able to connect to the DB. Do you know why nothing happens?
> Also, I think there should be a real "DB.php" file, correct? What
> should I put into this file? Or is it only a line "as is", that doesn't
> mean there needs a "DB.php" file?
> Thanks,

You need to read the docs:
http://pear.php.net/manual/index.php

Specifically:
http://pear.php.net/manual/en/installation.php

--
Schluppy

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация