启动PHP内置的开发服务器
1.本地启动命令
php -S localhost:8001
2.监听所有可用的网络接口
php -S 0.0.0.0:8000
3.区别
你可以从本机访问 http://localhost:8000 或 http://127.0.0.1:8000
同一网络中的其他设备也可以通过你电脑的IP地址访问这个服务器(如 http://192.168.1.100:8000)
php -S localhost:8001
php -S 0.0.0.0:8000
你可以从本机访问 http://localhost:8000 或 http://127.0.0.1:8000
同一网络中的其他设备也可以通过你电脑的IP地址访问这个服务器(如 http://192.168.1.100:8000)