How to get the full path to php interpreter / binary without shell access

后端 未结 4 938
北恋
北恋 2020-12-17 16:37

How can I get the full path to php interpreter from a php script (no command line access).

What I need to do is:

$foo = \"/usr/bin/php\";
echo $foo;
         


        
4条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-17 17:19

    On Windows I would suggest the following snippet:

    On unix the shell command should probably make use of ps

提交回复
热议问题