How to execute PHP code from the command line?

前端 未结 5 949
逝去的感伤
逝去的感伤 2020-12-04 06:41

I would like to execute a single php statement like if(function_exists(\"my_func\")) echo \'function exists\'; directly with the command line without having to

5条回答
  •  忘掉有多难
    2020-12-04 07:25

    On the command line:

    php -i | grep sourceguardian
    

    If it's there, then you'll get some text. If not, you won't get a thing.

提交回复
热议问题