I have been trying to do this:
$handle = popen('php -q nah.php?part='. $part . ' 2>&1', 'r');
while (!feof($handle))
{
$read = fread($handle, 2096);
echo $read;
}
pclose($handle);
What i want to do is i want to pass some values to the file nah.php but When i try it this way i get an error this :
Could not open input file: nah.php?part=say:
How can i do this ?
And yea i am using all this php-cli
Used in command-line, PHP doesn’t take GET arguments but command-line arguments, for example:
You can then get the value of these arguments using getopt():