Connecting Tech Pros Worldwide Forums | Help | Site Map

How heck pear package?

=?KOI8-R?B?JWFudGF6eSUtZ23BaWwtJWNvbSU=?=
Guest
 
Posts: n/a
#1: Aug 24 '08
Hi, how check install or not pear package? (in *.php, not in cli)

fred
Guest
 
Posts: n/a
#2: Aug 25 '08

re: How heck pear package?


On Aug 23, 8:28 pm, %antazy%-gmÁil-%com% <ant...@gmail.comwrote:
Quote:
Hi, how check install or not pear package? (in *.php, not in cli)
From the PHP online manual for "include":

if ((include 'vars.php') == 'OK') {
echo 'OK';
}

So, obviously, something like:

if ((include 'PEAR/Config.php') == 'OK') {
echo 'OK';
}
Hans-Werner Hilse
Guest
 
Posts: n/a
#3: Aug 26 '08

re: How heck pear package?


Hi,

fred wrote:
Quote:
On Aug 23, 8:28 pm, %antazy%-gmаil-%com% <ant...@gmail.comwrote:
Quote:
Hi, how check install or not pear package? (in *.php, not in cli)
>
From the PHP online manual for "include":
>
if ((include 'vars.php') == 'OK') {
echo 'OK';
}
Will only execute the conditional part if »vars.php« has and executes a
»return "OK";«. This is made quite clear in the text above the example
you've cited here. And the example following the one you've cited
points it out better. Nevertheless, the OP should read that manual
section.
Quote:
So, obviously, something like:
>
if ((include 'PEAR/Config.php') == 'OK') {
echo 'OK';
}
Wrong (as long as there's no such »return 'OK';« in PEAR/Config.php).
But of course you could just catch the error when the include fails.

-hwh
Closed Thread