Hello everyone,
I have xampp installed on windows 7 and it works perfectly. However, I don't know how to use PEAR that is apparently included with xampp. There are a few bits and pieces on the Internet involving this, but none that actually solve my problem really.
I am putting all of my .php files that I want to run in the' htdocs' folder. I want to be able to connect to databases, using PEAR, with files placed in the htdocs folder using
require 'DB.php'
, initially, to load the required module. I should explain that I am currently reading 'Learning PHP 5' by O'Reilly and they use PEAR in this manner to connect to databases in the database chapter of the book and I really want to follow it, but cannot get the PEAR part of xampp to work.
So, basically, how can I connect to a database, using PEAR with xampp, from files placed in the hdocs folder. I get this error when I try to connect:
Warning: require(DB.php) [function.require]: failed to open stream: No such file or directory in E:\xampp\htdocs\Test.php on line 3
Fatal error: require() [function.require]: Failed opening required 'DB.php' (include_path='.;\xampp\php\PEAR') in E:\xampp\htdocs\Test.php on line 3.
It is probably an easy thing to do and it is probably obvious why this error is occuring, but I have absolutely no idea what I am doing in this area and so don't want to start changing config files or moving folders around without advice from people who actually know what they are doing 🙂.
Thanks hugely, in advance, for any replies.
Jason.