ID:               42194
 Updated by:       j...@php.net
 Reported By:      backbone46 at gmail dot com
-Status:           To be documented
+Status:           Closed
 Bug Type:         Scripting Engine problem
 Operating System: Windows XP
 PHP Version:      6CVS-2007-08-03 (CVS)


Previous Comments:
------------------------------------------------------------------------

[2009-07-28 11:22:26] s...@php.net

Automatic comment from SVN on behalf of rquadling
Revision: http://svn.php.net/viewvc/?view=revision&revision=286450
Log: Bug#42194 - Document how to get command line script working like
BAT files without the need to supply the executable or the extension and
have all parameters supplied passed to the script.

------------------------------------------------------------------------

[2009-07-28 09:40:11] rquadl...@php.net

You have to tell windows that multiple parameters are allowed.

By associating in the way that you've done, you are only going to be 
getting the script name assigned to the interpreter.

The registry needs amending so that the handler's Run command looks
more 
like ...

"C:\PHP5\PHP.EXE" "%1" %*

So, the script name is supplied in quotes (allowing script path or file

name to have spaces) followed by all the other parameters.

------------------------------------------------------------------------

[2007-08-03 04:36:21] backbone46 at gmail dot com

Description:
------------
I did a right-click->open-with->chose-program->browsed to php.exe
Checked the "Always use the selected program to open this kind of file"
OK

So launched the following line in the console
C:\>script.php 1arg 2arg 3arg

Reproduce code:
---------------
<?php
echo "\nArguments:$argc\n";
?>

Expected result:
----------------
Arguments:4

Actual result:
--------------
Arguments:1


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=42194&edit=1

Reply via email to