php内置WEB服务器

-S : Run with built-in web server.
-t Specify document root for built-in web server.

解释:
-S 访问地址:端口 //通过内置web服务运行php
-t 站点根目录 //指定web服务的网站根目录

zrj@zrj:~$ php -S localhost:8080 -t ~/www/zhangrenjie_test/test/
PHP 7.0.18-0ubuntu0.16.04.1 Development Server started at Thu Jul  6 11:31:12 2017
Listening on http://localhost:8080
Document root is /home/zrj/www/zhangrenjie_test/test
Press Ctrl-C to quit.
[Thu Jul  6 11:31:26 2017] 127.0.0.1:50692 [200]: /12.php
[Thu Jul  6 11:31:29 2017] 127.0.0.1:50696 [200]: /11.php
posted @ 2020-05-01 10:14  yonomo  阅读(201)  评论(0)    收藏  举报