PEAR custom include [NOT INSTALLED]

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sweb
Forum Newbie
Posts: 18
Joined: Tue Oct 30, 2007 6:32 am
Location: Iran (Semnan)

PEAR custom include [NOT INSTALLED]

Post by sweb »

i want to use PEAR packages that not install in PEAR directory of PHP. such as a framework.

for example :

Code: Select all

require('./myincludes/PEAR/PEAR.php');
$mytar = new Archive_Tar('mytar');
...
what must i do? :banghead:
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: PEAR custom include [NOT INSTALLED]

Post by Benjamin »

Download the PEAR packages?
sweb
Forum Newbie
Posts: 18
Joined: Tue Oct 30, 2007 6:32 am
Location: Iran (Semnan)

Re: PEAR custom include [NOT INSTALLED]

Post by sweb »

yes i download core PEAR class and any package i need to use.

after that i extract the pear core package in 'myinclude' folder and extract packages in PEAR directory.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: PEAR custom include [NOT INSTALLED]

Post by Benjamin »

Cool, did it work?
sweb
Forum Newbie
Posts: 18
Joined: Tue Oct 30, 2007 6:32 am
Location: Iran (Semnan)

Re: PEAR custom include [NOT INSTALLED]

Post by sweb »

Code: Select all

Warning: require_once(Text/Wiki.php) [function.require-once]: failed to open stream: No such file or directory in F:\www\temp\gzz\bbc\Text\Wiki\BBCode.php on line 20
this error.

i want to know is anyone use this method ?
is method is optimized and secure ?

instllation of pear is to difficult and some times has errors and the server pear packast sometimes have different version on my localhost packasge i want to use it from this method. :D
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: PEAR custom include [NOT INSTALLED]

Post by Benjamin »

I don't have any experience using PEAR. I would assume that if the files are in the correct place (or in the include path set in php.ini), the code should perform as advertised.
Post Reply