Run .php file in Windows Command Prompt (cmd)

后端 未结 4 387
灰色年华
灰色年华 2020-12-08 11:04

I want to run a .php file in windows cmd. I followed this (suggestion) php is not recognized as an internal command (in Windows)

But it did not work.

4条回答
  •  醉梦人生
    2020-12-08 11:39

    You should declare Environment Variable for PHP in path, so you could use like this:

    C:\Path\to\somewhere>php cli.php
    

    You can do it like this

提交回复
热议问题