Jump to content

PEAR Newbie question...


russia5

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...
Link to comment
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.
Link to comment
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]
Link to comment
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?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

×
×
  • Create New...

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.