1
- .TH PHP 1 "2014" "The PHP Group" "Scripting Language"
1
+ .TH @program_prefix@php 1 "2014" "The PHP Group" "Scripting Language"
2
2
.SH NAME
3
- php \- PHP Command Line Interface 'CLI'
3
+ @program_prefix@ php \- PHP Command Line Interface 'CLI'
4
4
.P
5
- php-cgi \- PHP Common Gateway Interface 'CGI' command
5
+ @program_prefix@ php-cgi \- PHP Common Gateway Interface 'CGI' command
6
6
.SH SYNOPSIS
7
- .B php
7
+ .B @program_prefix@ php
8
8
[options] [
9
9
.B \- f\fP ]
10
10
.IR file
11
11
[[\-\- ]
12
12
.IR args.\| .\| . ]
13
13
.LP
14
- .B php
14
+ .B @program_prefix@ php
15
15
[options]
16
16
.B \- r
17
17
.IR code
18
18
[[\-\- ]
19
19
.IR args.\| .\| . ]
20
20
.LP
21
- .B php
21
+ .B @program_prefix@ php
22
22
[options] [\- B
23
23
.IR begin_code ]
24
24
.B \- R
@@ -28,7 +28,7 @@ php-cgi \- PHP Common Gateway Interface 'CGI' command
28
28
[[\-\- ]
29
29
.IR args.\| .\| . ]
30
30
.LP
31
- .B php
31
+ .B @program_prefix@ php
32
32
[options] [\- B
33
33
.IR begin_code ]
34
34
.B \- F
@@ -38,13 +38,13 @@ php-cgi \- PHP Common Gateway Interface 'CGI' command
38
38
[[\-\- ]
39
39
.IR args.\| .\| . ]
40
40
.LP
41
- .B php
41
+ .B @program_prefix@ php
42
42
[options] \-\- [
43
43
.IR args.\| .\| . ]
44
44
.LP
45
- \fB php \fP [options] \fB \- a \fP
45
+ \fB @program_prefix@php \fP [options] \fB \- a \fP
46
46
.LP
47
- .B php
47
+ .B @program_prefix@ php
48
48
[options] \- S
49
49
.IR addr:port
50
50
[\- t
@@ -374,35 +374,35 @@ The standard configuration file will only be used when
374
374
cannot be found.
375
375
.SH EXAMPLES
376
376
.TP 5
377
- \fI php \- r 'echo "Hello World \\n " ;' \fP
377
+ \fI @program_prefix@php \- r 'echo "Hello World \\n " ;' \fP
378
378
This command simply writes the text "Hello World" to standard out.
379
379
.TP
380
- \fI php \- r 'print_r(gd_info());' \fP
380
+ \fI @program_prefix@php \- r 'print_r(gd_info());' \fP
381
381
This shows the configuration of your gd extension. You can use this
382
382
to easily check which image formats you can use. If you have any
383
383
dynamic modules you may want to use the same ini file that php uses
384
384
when executed from your webserver. There are more extensions which
385
385
have such a function. For dba use:
386
386
.RS
387
- \fI php \- r 'print_r(dba_handlers(1));' \fP
387
+ \fI @program_prefix@php \- r 'print_r(dba_handlers(1));' \fP
388
388
.RE
389
389
.TP
390
- \fI php \- R 'echo strip_tags($argn)." \\n " ;' \fP
390
+ \fI @program_prefix@php \- R 'echo strip_tags($argn)." \\n " ;' \fP
391
391
This PHP command strips off the HTML tags line by line and outputs the
392
392
result. To see how it works you can first look at the following PHP command
393
393
\' \fI php \- d html_errors=1 \- i \fP \' which uses PHP to output HTML formatted
394
394
configuration information. If you then combine those two
395
395
\' \fI php \.\.\. |php \.\.\. \fP \' you'll see what happens.
396
396
.TP
397
- \fI php \- E 'echo "Lines: $argi \\n " ;' \fP
397
+ \fI @program_prefix@php \- E 'echo "Lines: $argi \\n " ;' \fP
398
398
Using this PHP command you can count the lines being input.
399
399
.TP
400
- \fI php \- R '@$l+=count(file($argn));' \- E 'echo "Lines:$l \\n " ;' \fP
400
+ \fI @program_prefix@php \- R '@$l+=count(file($argn));' \- E 'echo "Lines:$l \\n " ;' \fP
401
401
In this example PHP expects each input line being a file. It counts all lines
402
402
of the files specified by each input line and shows the summarized result.
403
403
You may combine this with tools like find and change the php scriptlet.
404
404
.TP
405
- \fI php \- R 'echo "$argn \\n " ; fgets(STDIN);' \fP
405
+ \fI @program_prefix@php \- R 'echo "$argn \\n " ; fgets(STDIN);' \fP
406
406
Since you have access to STDIN from within \- B \- R \- F and \- E you can skip
407
407
certain input lines with your code. But note that in such cases $argi only
408
408
counts the lines being processed by php itself. Having read this you will
0 commit comments