dshbusiness
V2EX  ›  PHP

php 有没有像 django 那样的开发时候用的简易的服务器?

  •  
  •   dshbusiness · Dec 25, 2014 · 4561 views
    This topic created in 4344 days ago, the information mentioned may be changed or developed.

    RT

    用django的时候,可以有一个简单的web服务器跑在8080或者8000之类的端口,可以快速启动、快速关闭,方便调试,不知道php有没有这样的工具?

    谢谢

    23 replies  •  2014-12-26 10:45:36 +08:00
    dshbusiness
    dshbusiness
    OP
    Dec 25, 2014
    1
    哦,找到了,原来也自带了,这样就方便多了,不用费时费力去配置apache了,可叹自己真落后,今天才发现这个。
    invite
    invite
    Dec 25, 2014
    2
    @dshbusiness 求分享。
    66beta
    66beta
    Dec 25, 2014
    4
    集成环境也很方便啊,xampp有免安装的
    pertersonvv
    pertersonvv
    Dec 25, 2014
    5
    @dshbusiness 不配apache,可以用数据库么?
    LazyZhu
    LazyZhu
    Dec 25, 2014
    6
    @dshbusiness 一样的头像...
    datou552211
    datou552211
    Dec 25, 2014 via iPhone
    7
    php依赖服务器,和asp一样
    anewg
    anewg
    Dec 25, 2014
    8
    @datou552211 5.4以上自带服务器
    anewg
    anewg
    Dec 25, 2014
    9
    @pertersonvv 能不能连数据库是php驱动的事,跟web server没啥关系
    pertersonvv
    pertersonvv
    Dec 25, 2014
    10
    @anewg 可以用自带服务器跑wordpress么?支持多大访问量?
    hyzjshwo
    hyzjshwo
    Dec 25, 2014
    11
    PHP 5.4 +

    php -S localhost:8000
    anewg
    anewg
    Dec 25, 2014
    12
    @pertersonvv 自带的也就玩玩而已,手册也说了,This web server is designed for developmental purposes only, and should not be used in production。生产环境还是老老实实Apache或Nginx
    yangxin0
    yangxin0
    Dec 25, 2014
    13
    phpnow
    garth
    garth
    Dec 25, 2014 via iPhone
    14
    UsbPHPServer
    pertersonvv
    pertersonvv
    Dec 26, 2014
    15
    @anewg 自带的,用来带一个10多人访问的WordPress可以么?
    pertersonvv
    pertersonvv
    Dec 26, 2014
    16
    @garth 基于xampp改的?
    garth
    garth
    Dec 26, 2014 via iPhone
    17
    @pertersonvv 不太清楚,反正很便携,直接放在U盘去哪里都可以快速启动PHP环境
    dshbusiness
    dshbusiness
    OP
    Dec 26, 2014
    18
    @invite 先切换到php网站的目录,然后php -S 0.0.0.0:8080就运行在8080端口上了。
    dshbusiness
    dshbusiness
    OP
    Dec 26, 2014
    19
    @pertersonvv 可以用,但是数据库还是要启动mysql,估计有办法切换为sqlite之类的。我用的数据库默认的那个test数据库,调试用的数据什么的都往进去塞。倒还不难配置。
    dshbusiness
    dshbusiness
    OP
    Dec 26, 2014
    20
    @LazyZhu :)是呀,好巧!
    dshbusiness
    dshbusiness
    OP
    Dec 26, 2014
    21
    @pertersonvv 肯定没多少,不过我就是拿他做调试用,只有我一个人能访问或者局域网能访问就行了。
    anewg
    anewg
    Dec 26, 2014
    22
    @pertersonvv 没试过
    iscraft
    iscraft
    Dec 26, 2014
    23
    quickphp webserver
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2307 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 73ms · UTC 00:29 · PVG 08:29 · LAX 16:29 · JFK 19:29
    ♥ Do have faith in what you're doing.