I'm having issues similar to some other people, however I've tried multiple things with no resolution.
I've created a very small, simple test script to show what happens.
<?php
print "In Script!\n";
var_dump($argv);
?>
Ok, now i can run it with the following command:-
C:\TEMP> c:\php\php.exe hughTest.php 1 2 3 4
Output:-
In Script!
array(4) {
[0]=>
string(12) "hughTest.php"
[1]=>
string(1) "1"
[2]=>
string(1) "2"
[3]=>
string(1) "3"
}
Which is good, this is what I'm expecting. Now just running script as .php:-
C:\TEMP> hughTest.php 1 2 3
Output:-
In Script!
array(1) {
[0]=>
string(20) "C:\temp\hughTest.php"
}
This is NOT what I expected! Where have the parameters gone?
I've checked/tried to modify the file associations with no change in output. I've also tried a few different versions of PHP. (5.4 and 5.5). w32 on x64.
Association: .php = phpfile
ftype: phpfile="C:\php\php.exe" "%1" -- %*
also tried:-
phpfile="C:\php\php.exe" "%1" -- %~2
phpfile="C:\php\php.exe" "%1" %*
phpfile="C:\php\php.exe" "%1" -- "%*"
All with the same results.
Any suggestions on where to look next?
Hugh