myvesta-php-func support for stdin

This commit is contained in:
myvesta 2023-04-14 15:39:33 +02:00 committed by GitHub
parent 77467eeebd
commit 4dd6d22f07
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 126 additions and 6 deletions

View file

@ -7,6 +7,14 @@ else $SHLVL=3;
if (!isset($argv)) exit(5);
stream_set_blocking(STDIN, false);
$myvesta_stdin='';
$myvesta_f = fopen( 'php://stdin', 'r' );
while( $myvesta_line = fgets( $myvesta_f ) ) {
$myvesta_stdin .= $myvesta_line;
}
fclose( $myvesta_f );
include ("/usr/local/vesta/func/main.php");
include ("/usr/local/vesta/func/string.php");