Recommended Posts

Posted

How do I use PEAR?

Is there a special directory I need to upload my script into? How do I call PEAR modules?

I've been searching the PEAR docs but I can't figure it out.

Thanks!

Posted

I was able to figure it out.

It's pretty basic. All you have to do is set the include path...


<?PHP


set_include_path('/home/username/php');


require_once('PEAR.php');


$pear = new PEAR();


......


?>

PEAR seems to be just like PERL modules for PHP. A cool idea.

Posted

Yep it is a cool idea.

I believe it used to do the includes for you so you did not need to do that. The problem though is it clogged up the apache configuration file so it was super slow loading all the extra files. So a simple include path will get you the same result and won't slow down our web server reloading which needs to be done each time a domain is added, remove ect.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...