Skip to content

Commit 997a367

Browse files
alexandre-dauboisnielsdos
authored andcommitted
Fix GH-10964: Improve man page about the built-in server
Closes GH-11857.
1 parent 509906b commit 997a367

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

NEWS

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ PHP NEWS
55
- CLI:
66
. Fixed bug GH-11716 (cli server crashes on SIGINT when compiled with
77
ZEND_RC_DEBUG=1). (nielsdos)
8+
. Fixed bug GH-10964 (Improve man page about the built-in server).
9+
(Alexandre Daubois)
810

911
- DOM:
1012
. Fix DOMEntity field getter bugs. (nielsdos)

sapi/cli/php.1.in

+9
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,15 @@ point to a local address and port PHP will listen to HTTP requests on that addre
9292
.B docroot
9393
passed by the \-t option.
9494
.LP
95+
If a PHP file is provided to the command line when the
96+
built-in web server is used, it will be used as the router script. This script
97+
will be started at each HTTP request. The script output is returned to the
98+
browser, unless the router script returns the
99+
.B false
100+
value. If so, the built-in server falls back to the default behaviour, returning
101+
the requested resource as-is by looking up the files relative to the document
102+
root specified by the \-t option, if provided.
103+
.LP
95104
If none of \-r \-f \-B \-R \-F \-E or \-S is present but a single parameter is given
96105
then this parameter is taken as the filename to parse and execute (same as
97106
with \-f). If no parameter is present then the standard input is read and

0 commit comments

Comments
 (0)