Skip to content

Commit 6f560b0

Browse files
committed
Document embedded server options in manpage
1 parent de71f43 commit 6f560b0

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

sapi/cli/php.1.in

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ php \- PHP Command Line Interface 'CLI'
4242
.LP
4343
\fBphp \fP[options] \fB\-a\fP
4444
.LP
45+
.B php
46+
[options] \-S
47+
.IR addr:port
48+
[\-t
49+
.IR docroot ]
50+
.LP
4551
.SH DESCRIPTION
4652
\fBPHP\fP is a widely\-used general\-purpose scripting language that is especially suited for
4753
Web development and can be embedded into HTML. This is the command line interface
@@ -78,7 +84,13 @@ and therefore reading from
7884
.B STDIN
7985
explicitly changes the next input line or skips input lines.
8086
.LP
81-
If none of \-r \-f \-B \-R \-F or \-E is present but a single parameter is given
87+
PHP also contains an embedded web server for application development purpose. By using the \-S option where
88+
.B addr:port
89+
point to a local address and port PHP will listen to HTTP requests on that address and port and serve files from the current working directory or the
90+
.B docroot
91+
passed by the \-t option.
92+
.LP
93+
If none of \-r \-f \-B \-R \-F \-E or \-S is present but a single parameter is given
8294
then this parameter is taken as the filename to parse and execute (same as
8395
with \-f). If no parameter is present then the standard input is read and
8496
executed.
@@ -263,6 +275,20 @@ after processing all input lines
263275
Output HTML syntax highlighted source
264276
.TP
265277
.PD 0
278+
.B \-\-server \fIaddr:port\fP
279+
.TP
280+
.PD 1
281+
.B \-S \fIaddr:port\fP
282+
Start embedded Webserver on the given local address and port
283+
.TP
284+
.PD 0
285+
.B \-\-docroot \fIdocroot\fP
286+
.TP
287+
.PD 1
288+
.B \-t \fIdocroot\fP
289+
Specify the document root to be used by the embedded web server
290+
.TP
291+
.PD 0
266292
.B \-\-version
267293
.TP
268294
.PD 1

0 commit comments

Comments
 (0)