Could not execute php script command line
<p>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 <a href="http://test.localhost.com/test.php" rel="nofollow">http://test.localhost.com/test.php</a>". Below is my code for the same.</p>

<pre><code>#!/usr/local/bin/php  
&lt;?php  
$stdin = fopen('php://stdin', 'r');  
while (true) {  
        $input = fgets($stdin, 3);  
        if ($input == 42) {  
                break;  
        } else {  
                echo $input;  
        }  
}  
fclose($stdin);  
exit;
</code></pre>

<p>I giving me above error. Can anyone tell me what is the problem?</p>
