khizar Posted October 2, 2010 Share Posted October 2, 2010 hey guys m using STDIN as input stream in php command line my problem is that some time i get this error Warning: fgets(): supplied argument is not a valid stream resource in D:\myquery \test.php on line 16 $number=fgets(STDIN); anyone knows solution Quote Link to comment https://forums.phpfreaks.com/topic/215006-php-command-line-errror/ Share on other sites More sharing options...
JTallis Posted October 2, 2010 Share Posted October 2, 2010 It's saying that STDIN is not a valid arguement. What is STDIN? I'm not sure. I googled it with an error like what you have. This seemed to of fixed the problem define('STDIN', fopen("php://stdin","r")); Quote Link to comment https://forums.phpfreaks.com/topic/215006-php-command-line-errror/#findComment-1118428 Share on other sites More sharing options...
khizar Posted October 3, 2010 Author Share Posted October 3, 2010 thank you its solved Quote Link to comment https://forums.phpfreaks.com/topic/215006-php-command-line-errror/#findComment-1118487 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.