command line or not???

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Adam Dyga

    command line or not???


    Hello,

    What's the best way to check whether script is run from command line or by
    web server?

    --
    Greets
    adeon
  • Pedro Graca

    #2
    Re: command line or not???

    Adam Dyga wrote:[color=blue]
    > What's the best way to check whether script is run from command line or by
    > web server?[/color]

    I'd use php_sapi_name()
    Returns the type of interface between web server and PHP

    --
    --= my mail box only accepts =--
    --= Content-Type: text/plain =--
    --= Size below 10001 bytes =--

    Comment

    Working...