I am using xampp and windows OS. I am trying to execute simple php script command line but I got an error like "Could not open input file http://test.localhost.com/test.php". Below is my code for the same.
#!/usr/local/bin/php
<?php
$stdin = fopen('php://stdin', 'r');
while (true) {
$input = fgets($stdin, 3);
if ($input == 42) {
break;
} else {
echo $input;
}
}
fclose($stdin);
exit;
I giving me above error. Can anyone tell me what is the problem?