1

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

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.

Ivar
  • 6,138
  • 12
  • 49
  • 61

1 Answers1

1

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 127.0.0.2:8000 or start php -S 127.0.0.2:8000
  • save
  • double click your file
1stthomas
  • 731
  • 2
  • 15
  • 22