linux - Why isn't PHP's STDIN defined when operating with Apache? -
i operating php version 5.5.24 on centos 6. http://php.net/manual/en/wrappers.php.php seems imply should use defined constant stdin
, however, shown when executed apache, not defined.
<?php $input = fgets(stdin);
notice: use of undefined constant stdin - assumed 'stdin' in /var/www/bidjunction/html/stdin.php on line 2
warning: fgets() expects parameter 1 resource, string given in /var/www/bidjunction/html/stdin.php on line 2
edit. defined cli. let me update title.
[michael@devserver ~]$ php -r 'echo(stdin);' resource id #1 [michael@devserver ~]$
per deceze's comment.
fwiw, stdin seems defined cli sapi: php.net/manual/en/features.commandline.io-streams.php
Comments
Post a Comment