Hi, how check install or not pear package? (in *.php, not in cli)
How heck pear package?
Collapse
This topic is closed.
X
X
-
=?KOI8-R?B?JWFudGF6eSUtZ23BaWwtJWNvbSU=?=Tags: None -
fred
Re: How heck pear package?
On Aug 23, 8:28 pm, %antazy%-gmÁil-%com% <ant...@gmail.c omwrote:From the PHP online manual for "include":Hi, how check install or not pear package? (in *.php, not in cli)
if ((include 'vars.php') == 'OK') {
echo 'OK';
}
So, obviously, something like:
if ((include 'PEAR/Config.php') == 'OK') {
echo 'OK';
}
-
Hans-Werner Hilse
Re: How heck pear package?
Hi,
fred wrote:
Will only execute the conditional part if »vars.php« has and executes aOn Aug 23, 8:28 pm, %antazy%-gmаil-%com% <ant...@gmail.c omwrote:>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';
}
»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.
Wrong (as long as there's no such »return 'OK';« in PEAR/Config.php).So, obviously, something like:
>
if ((include 'PEAR/Config.php') == 'OK') {
echo 'OK';
}
But of course you could just catch the error when the include fails.
-hwh
Comment
Comment