Get current PHP executable from within script?

前端 未结 10 1980
一个人的身影
一个人的身影 2020-12-03 21:08

I want to run a PHP cli program from within PHP cli. On some machines where this will run, both php4 and php5 are installed. If I run the outer program as

         


        
10条回答
  •  隐瞒了意图╮
    2020-12-03 21:16

    You could use phpversion() to get the current version of PHP before you execute the "inner" script.

    http://php.net/manual/en/function.phpversion.php

提交回复
热议问题