zoukankan      html  css  js  c++  java
  • PHP内置的Web Server的使用

     

    自PHP5.4之后 PHP内置了一个Web 服务器。

    让我们来看看php Web Server的简单使用:

    启动php Web Server

    php -S localhost:8080



    通过 php -S 命令即可启动PHP自带的Web Server,后面跟网络地址及监听的端口号,默认的网站根目录为当前目录。访问http://localhost:8080



    指定网站根目录,-t命令

    php -S localhost:8080 -t /www

    支持远程访问

    php -S 0.0.0.0:8080 -t /www

    最后:

    PHP该内置的Web Server用于个人测试及小网站的开发是没有任何问题的,不是大型应用还是要配合Nginx或Apache以达到最高效率。

  • 相关阅读:
    c++ string 的注意事项
    vim 高级技巧
    常用工具
    网络安全测试工具
    RMQ ST算法
    高精度模板
    CodeForces
    CodeForces
    线段树初探
    树状数组初探
  • 原文地址:https://www.cnblogs.com/liangxiaofeng/p/5113423.html
Copyright © 2011-2022 走看看