我经常使用CMD(windows)中的PHP内置服务器:php -S 127.0.0.2:8000
php -S 127.0.0.2:8000
但是,我想创建一个CMD文件,我只需双击即可运行服务器。我试过:exec,chell_exec,系统,但它不起作用。
exec
chell_exec
你需要的是一个批处理程序。看看这些来源:
[1] [2]
怎么做:
start php -S 127.0.0.2:8000