更新时间:2023-11-29 16:58:04
php:// input
仅适用于从Web服务器运行的脚本。
php://input
only works for scripts run from the webserver.
当CLI脚本需要访问标准输入时,它们使用 php: // stdin
,或已打开的流 STDIN
:
When CLI scripts need to access standard input, they use php://stdin
, or the already opened stream STDIN
:
<?php echo file_get_contents('php://stdin'); ?>
或
<?php echo stream_get_contents(STDIN); ?>