Jump to content

Archived

This topic is now archived and is closed to further replies.

russia5

PEAR Newbie question...

Recommended Posts

This is probably a basic for most of you.  But, if I want to use a function that is PEAR or PECL, how do I do it?  Cut and Paste it from somewhere on my host?  Maybe call it with a tag?

Also, how would I find out all of the extensions and libraries that my HOST has besides ask them?  Thanks...

Share this post


Link to post
Share on other sites
[quote]But, if I want to use a function that is PEAR or PECL, how do I do it?  Cut and Paste it from somewhere on my host?  Maybe call it with a tag?[/quote]

Yes, include the script, then call the function or class.

[quote]Also, how would I find out all of the extensions and libraries that my HOST has besides ask them?[/quote]

Use phpinfo() or ask them.

Share this post


Link to post
Share on other sites
I may be wrong, but to use PECL I believe you need to recompile PHP with the extensions flagged.  As for PEAR that is usually just a matter of including the proper file in your script.  I often make a lib directory and store PEAR packages there, for example MDB2...
[code]
require_once 'lib/db/MDB2.php';

// use the package now, huzzah
[/code]

Share this post


Link to post
Share on other sites
My Host has told me we have PEAR installed.  This would mean I do not have to start a dirctory and upload the PEAR packages to it, correct?  Is there another reason you start a lib directory besides your host not having PEAR packages installed?

Share this post


Link to post
Share on other sites
[code]
include_once('DB.php');// This will not be in your directory, but it will be in php's
[/code]

for the manual I would refer you to: http://pear.php.net/

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.