note 110297 deleted from function.file-get-contents by salathe

From: Date: Mon, 21 Sep 2020 14:37:16 +0000
Subject: note 110297 deleted from function.file-get-contents by salathe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-215223@lists.php.net to get a copy of this message
Note Submitter: leomac at inbox dot ru ---- Reading all script input is simple task with file_get_contents, but it depends on what SAPI is being used. Only in Apache, not in CLI: <?php $input = file_get_contents("php://input"); ?> Only in CLI, not in Apache: <?php $input = file_get_contents("php://stdin"); ?> In Apache php://stdin will be empty, in CLI php://input will be empyt instead with no error indication.

« previous php.notes (#215223) next »