run the PHP buit-in web server from file cmd

php windows server

61 观看


10 作者的声誉

I often use the PHP built-in server from CMD (windows) with: php -S

But, I want to create a CMD File, which I just double click to run the server. I tried with : exec, chell_exec, system but it doesn't work.

作者: Younes 的来源 发布者: 2017 年 12 月 27 日

回应 (1)


673 作者的声誉


What you need is a batch programm. Take a look on these sources:

[1] [2]

How to do it:

  • create a file e.g. yourbatch.bat
  • add following line: php -S or start php -S
  • save
  • double click your file
作者: 1stthomas 发布者: 27.12.2017 04:45