function getResponse() {
$responseID = @fopen('php://stdin', 'r') or die('Cannot read from stdin');
while (($response = @fgets($responseID, 1024)) !== false) {
@fclose($responseID);
return $response;
}
}
This function works just fine if using CLI PHP in a Unix platform. But this same function is required to be used in an application that is housed within a Windows XP platform, and in that platform, this function seems to ignore user input and returns null every time.
Does anyone have any idea why this would specifically happen only in Windows XP using CLI PHP and nowhere else? Is there some issue involving XP's version of stdin?
Thanks
Phil