diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/functions.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/functions.php b/include/functions.php index 3da777135..4ba60e844 100644 --- a/include/functions.php +++ b/include/functions.php @@ -5469,4 +5469,16 @@ return $output; } } + + function read_stdin() { + $fp = fopen("php://stdin", "r"); + + if ($fp) { + $line = trim(fgets($fp)); + fclose($fp); + return $line; + } + + return null; + } ?> |