PHP5.4将提供内建的Web服务器

来源:互联网 发布:windows启动nginx闪退 编辑:程序博客网 时间:2024/05/17 09:37

在命令行下,加-S,PHP-cli进程将运行一个内建的Web服务器,无需安装Apache。

php -S localhost:8888 index.php

index.php

<?phpecho $_GET['hello'];....

在浏览器中输入 http://localhost:8888/?hello=test

显示 test