Skip to content

Add built-in web server to cli usage, and align terminology in cli manpage #377

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions sapi/cli/php.1.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@ php-cgi \- PHP Common Gateway Interface 'CGI' command
.LP
.B php
[options] [\-B
.IR code ]
.IR begin_code ]
.B \-R
.IR code
[\-E
.IR code ]
.IR end_code ]
[[\-\-]
.IR args.\|.\|. ]
.LP
.B php
[options] [\-B
.IR code ]
.IR begin_code ]
.B \-F
.IR file
[\-E
.IR code ]
.IR end_code ]
[[\-\-]
.IR args.\|.\|. ]
.LP
Expand Down Expand Up @@ -86,7 +86,7 @@ and therefore reading from
.B STDIN
explicitly changes the next input line or skips input lines.
.LP
PHP also contains an embedded web server for application development purpose. By using the \-S option where
PHP also contains an built-in web server for application development purpose. By using the \-S option where
.B addr:port
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
.B docroot
Expand Down Expand Up @@ -237,9 +237,9 @@ without using script tags
.B \-\-process\-begin \fIcode\fP
.TP
.PD 1
.B \-B \fIcode\fP
.B \-B \fIbegin_code\fP
Run PHP
.IR code
.IR begin_code
before processing input lines
.TP
.PD 0
Expand All @@ -264,9 +264,9 @@ for every input line
.B \-\-process\-end \fIcode\fP
.TP
.PD 1
.B \-E \fIcode\fP
.B \-E \fIend_code\fP
Run PHP
.IR code
.IR end_code
after processing all input lines
.TP
.PD 0
Expand All @@ -281,14 +281,14 @@ Output HTML syntax highlighted source
.TP
.PD 1
.B \-S \fIaddr:port\fP
Start embedded Webserver on the given local address and port
Start built-in web server on the given local address and port
.TP
.PD 0
.B \-\-docroot \fIdocroot\fP
.TP
.PD 1
.B \-t \fIdocroot\fP
Specify the document root to be used by the embedded web server
Specify the document root to be used by the built-in web server
.TP
.PD 0
.B \-\-version
Expand Down
3 changes: 2 additions & 1 deletion sapi/cli/php_cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,7 @@ static void php_cli_usage(char *argv0)
" %s [options] -r <code> [--] [args...]\n"
" %s [options] [-B <begin_code>] -R <code> [-E <end_code>] [--] [args...]\n"
" %s [options] [-B <begin_code>] -F <file> [-E <end_code>] [--] [args...]\n"
" %s [options] -S <addr>:<port> [-t docroot]\n"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding %s should also add an argument to printf

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Added a commit to fix this.

" %s [options] -- [args...]\n"
" %s [options] -a\n"
"\n"
Expand Down Expand Up @@ -544,7 +545,7 @@ static void php_cli_usage(char *argv0)
" --rz <name> Show information about Zend extension <name>.\n"
" --ri <name> Show configuration for extension <name>.\n"
"\n"
, prog, prog, prog, prog, prog, prog);
, prog, prog, prog, prog, prog, prog, prog);
}
/* }}} */

Expand Down