dshbusiness
V2EX  ›  PHP

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

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

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