russia5 Posted August 3, 2006 Share Posted August 3, 2006 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... Quote Link to comment https://forums.phpfreaks.com/topic/16478-pear-newbie-question/ Share on other sites More sharing options...
hitman6003 Posted August 4, 2006 Share Posted August 4, 2006 [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. Quote Link to comment https://forums.phpfreaks.com/topic/16478-pear-newbie-question/#findComment-68915 Share on other sites More sharing options...
Buyocat Posted August 4, 2006 Share Posted August 4, 2006 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] Quote Link to comment https://forums.phpfreaks.com/topic/16478-pear-newbie-question/#findComment-68916 Share on other sites More sharing options...
russia5 Posted August 4, 2006 Author Share Posted August 4, 2006 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? Quote Link to comment https://forums.phpfreaks.com/topic/16478-pear-newbie-question/#findComment-69344 Share on other sites More sharing options...
ignace Posted August 4, 2006 Share Posted August 4, 2006 [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/ Quote Link to comment https://forums.phpfreaks.com/topic/16478-pear-newbie-question/#findComment-69425 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.