Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/255.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
理解管道:PHP-c_Php_Shell - Fatal编程技术网

理解管道:PHP-c

理解管道:PHP-c,php,shell,Php,Shell,我无法理解此Linux命令: php-r“readfile('https://getcomposer.org/installer“| php-c php.ini 似乎第一部分php-r是管道到php-c。但它似乎正在读取php.ini 我在哪里可以找到有关php命令选项的更多信息,以及它们的意思(-v和-c),从而了解该命令的作用?来自manphp: 选择权 --互动的 -a以交互方式运行PHP。这使您可以输入 直接执行的PHP代码。当readline sup- 端口已启用,您可以编辑行,也可以

我无法理解此Linux命令:
php-r“readfile('https://getcomposer.org/installer“| php-c php.ini

似乎第一部分
php-r
是管道到
php-c
。但它似乎正在读取
php.ini


我在哪里可以找到有关php命令选项的更多信息,以及它们的意思(-v和-c),从而了解该命令的作用?

来自
manphp

选择权 --互动的 -a以交互方式运行PHP。这使您可以输入 直接执行的PHP代码。当readline sup- 端口已启用,您可以编辑行,也可以 历史支持

  --bindpath address:port|port
  -b address:port|port
                 Bind Path for external FASTCGI Server mode (CGI only).

  --no-chdir
  -C             Do not chdir to the script's directory (CGI only).

  --no-header
  -q             Quiet-mode. Suppress HTTP header output (CGI only).

  --timing count
  -T count       Measure execution time of script  repeated  count  times
                 (CGI only).

  --php-ini path|file
  -c path|file   Look  for  php.ini file in the directory path or use the
                 specified file

  --no-php-ini
  -n             No php.ini file will be used

  --define foo[=bar]
  -d foo[=bar]   Define INI entry foo with value bar

  -e             Generate extended information for debugger/profiler

  --file file
  -f file        Parse and execute file

  --help
  -h             This help

  --hide-args
  -H             Hide script name (file) and  parameters  (args...)  from
                 external  tools.  For  example  you may want to use this
                 when a php script is started as a daemon and the command
                 line contains sensitive data such as passwords.

  --info
  -i             PHP information and configuration

  --syntax-check
  -l             Syntax check only (lint)

  --modules
  -m             Show compiled in modules

  --run code
  -r code        Run PHP code without using script tags '<?..?>'

  --process-begin code
  -B begin_code  Run PHP begin_code before processing input lines

  --process-code code
  -R code        Run PHP code for every input line

  --process-file file
  -F file        Parse and execute file for every input line

  --process-end code
  -E end_code    Run PHP end_code after processing all input lines

  --syntax-highlight
  -s             Output HTML syntax highlighted source

  --server addr:port
  -S addr:port   Start built-in web server on the given local address and
                 port

  --docroot docroot
  -t docroot     Specify the document root to be used by the built-in web
                 server

  --version
  -v             Version number

  --strip
  -w             Output source with stripped comments and whitespace

  --zend-extension file
  -z file        Load Zend extension file

  args...        Arguments  passed  to  script.  Use '--' args when first
                 argument starts with '-' or script is read from stdin

  --rfunction    name
  --rf           name Shows information about function name

  --rclass       name
  --rc           name Shows information about class name

  --rextension   name
  --re           name Shows information about extension name

  --rzendextension
                 name
  --rz           name Shows information about Zend extension name

  --rextinfo     name
  --ri           name Shows configuration for extension name

  --ini          Show configuration file names
--bindpath地址:端口|端口
-b地址:港口|港口
外部FASTCGI服务器模式的绑定路径(仅限于CGI)。
--无chdir
-C不chdir到脚本的目录(仅限于CGI)。
--无标题
-q安静模式。抑制HTTP头输出(仅限CGI)。
--计时计数
-T count度量脚本重复计数次数的执行时间
(仅限CGI)。
--php ini路径|文件
-c path | file在目录路径中查找php.ini文件或使用
指定文件
--没有php-ini
-n不使用php.ini文件
--定义foo[=bar]
-d foo[=bar]使用值栏定义INI条目foo
-e生成调试器/探查器的扩展信息
--文件
-f文件解析和执行文件
--帮助
-这有什么帮助
--隐藏args
-H从隐藏脚本名称(文件)和参数(参数…)
外部工具。例如,您可能希望使用此
当php脚本作为守护进程启动时
行包含密码等敏感数据。
--信息
-i PHP信息和配置
--语法检查
-仅限语法检查(lint)
--模块
-m显示在模块中编译
--运行代码
-r代码不使用脚本标记“”运行PHP代码
--进程开始代码
-begin_代码在处理输入行之前运行PHP begin_代码
--过程代码
-R代码为每个输入行运行PHP代码
--进程文件
-F文件解析和执行每个输入行的文件
--进程结束代码
-E end_代码在处理所有输入行后运行PHP end_代码
--语法突出显示
-s输出突出显示的HTML语法源
--服务器地址:端口
-S addr:端口启动给定本地地址上的内置web服务器,以及
港口
--docroot docroot
-t docroot指定内置web要使用的文档根
服务器
--版本
-v版本号
--剥落
-w输出源代码,带剥离注释和空白
--zend扩展文件
-z文件加载Zend扩展文件
args。。。传递给脚本的参数。第一次使用“---”参数
参数以“-”开头,或者脚本是从stdin读取的
--函数名
--rf name显示有关函数名的信息
--rclass名称
--rc name显示有关类名的信息
--雷克斯名字
--重新命名显示有关扩展名的信息
--Rzendex张力
名称
--rz名称显示有关Zend扩展名的信息
--雷克斯汀福名字
--ri名称显示扩展名的配置
--显示配置文件名
从php.net:

用法:php[options][-f][-][args…]php[options]-r
[-][args…]php[options][B]-R
[-E
][-][args…]php[options][-B]-F
[-E][-][args…]php[options]-[args…]
php[选项]-a

-以交互方式运行-c |查找 此目录中的php.ini文件-n不会显示任何php.ini文件 使用-d foo[=bar]定义INI条目foo,值为'bar'-e 为调试器/探查器生成扩展信息-f
解析并执行-h此帮助-i
PHP信息-仅限l语法检查(lint)-m
显示在模块中编译的-r运行PHP而不使用 使用脚本标记-B运行PHP 在处理输入行之前-R为 每个输入行-F为每个 输入行-E在处理完所有 输入行-H从外部隐藏任何传递的参数 工具-S:使用内置web服务器运行-T 为内置web服务器指定文档根目录-s
输出突出显示的HTML语法源代码-v版本 编号-w输出源,带剥离注释和 空白-z加载Zend扩展

args。。。传递给脚本的参数。第一次使用时使用--args 论点 以开头-或从标准输入读取脚本

--显示配置文件名

--rf显示有关功能的信息--钢筋混凝土 显示有关类的信息--re
显示有关扩展的信息--rz秀 有关Zend扩展的信息--国际扶轮节目 扩展的配置

编辑:

php -r "readfile('https://getcomposer.org/installer');" | php -c php.ini
php-r“readfile('https://getcomposer.org/installer“);”php-c php.ini
此命令使用当前目录中的php.ini作为配置文件运行该文件。同样的道理也可以通过

php -r "require('https://getcomposer.org/installer');" -c php.ini php-r“需要”https://getcomposer.org/installer“);”-c php.ini
使用
-c
选项运行
php
,只需告诉它在哪里可以找到配置文件。
-r
选项告诉它运行提供的代码

您的命令所做的是获取一些远程PHP代码,然后