Tutorial on using PHP's built-in Web server

Source: Internet
Author: User
Tags phpinfo sapi

PHP has built a Web server in the CLI SAPI since 5.4, which is convenient for developers.
Just execute in the project directory

Php-s localhost:8001

Access link, the terminal will produce access log

E:\php\test\web_server>php-s localhost:8001
PHP 5.4.33 Development Server started at Sat Sep 26 12:10:01 2015
Listening on http://localhost:8001
Document Root is E:\php\test\web_server
Press Ctrl-c to quit.
[Sat Sep 12:10:07 2015] 127.0.0.1:65349 [m]:/phpinfo.php
[Sat Sep 12:10:07 2015] 127.0.0.1:65350 [m]:/phpinfo.php?=phpe9568f34-d428-11d2-a769-00aa001acf42
[Sat Sep 12:10:07 2015] 127.0.0.1:65351 [m]:/phpinfo.php?=phpe9568f35-d428-11d2-a769-00aa001acf42
[Sat Sep 12:10:07 2015] 127.0.0.1:65352 [404]:/favicon.ico-no such file or directory

Directory and different php.ini configurations can be specified

Php-s localhost:8001-t E:\php\test\web_server\-C D:\software\amp\php-5.6.5-Win32-VC11-x64\php.ini

Originally PHP 5.4 From the CLI SAPI built-in server Oh, the highest version of the use of small series is also php5.3 oh.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.