Warning: getimagesize(/home/astute/www/html/images/ourpics/photophp%00_t.jpg): failed to open stream: No such file or directory in /home/astute/www/html/util.php on line 160 Vt. Web Wizard - Internet/Database/IT Consultants
 
   Home
   About Me
   Rene's Resume
   Presentations
   Services
   Rates & Contracts
   Portfolio / Clients
   Demo Apps
   White Papers & Tips
   Tutorials
   Contact Me
 

Tutorials > PEAR > Using PEAR in your PHP Code

Once you've downloaded and installed PEAR using the code in your programs is very simple.

PEAR packages are predominantly classes that you can reference in your code. These classes reside in php files that you must include in your programs. Including these files is just like including any other file. The only thing you need to know before including the file is the name of the file. Luckily the file name is derived from the PEAR package name. In our case we're working with the XML_RSS package. The correspoding file name is ’XML/RSS.php’ To create the file name just change the underscore to a slash and add ’.php’ to the end. You can now include the file as follows:

require_once 'XML/RSS.php';

PHP looks in it's include_path for an ’XML’ directory and a file named ’RSS.php’ within that directory. This file contains the code used to parse an RSS feed.

That's all there really is to using PEAR. Once you've included the file you can now access all the code in those files. It's important to read about the classes and functions within the file. Specific package information is available on the PEAR website.

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/astute/www/html/template.php on line 198
 

This page was generated in 0.0030 seconds.
Website content © 2018