How heck pear package?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?KOI8-R?B?JWFudGF6eSUtZ23BaWwtJWNvbSU=?=

    How heck pear package?

    Hi, how check install or not pear package? (in *.php, not in cli)
  • fred

    #2
    Re: How heck pear package?

    On 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';
    }

    So, obviously, something like:

    if ((include 'PEAR/Config.php') == 'OK') {
    echo 'OK';
    }

    Comment

    • Hans-Werner Hilse

      #3
      Re: How heck pear package?

      Hi,

      fred wrote:
      On 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';
      }
      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.
      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

      Comment

      Working...