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

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -