note 38830 added to features.commandline
| From: | Jamie at rn2 dot php dot net | Date: | Thu, 08 Jan 2004 04:06:37 +0000 |
| Subject: | note 38830 added to features.commandline | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-63125@lists.php.net to get a copy of this message | ||
For windows users (using 5.0 rc3, not sure about older versions) if you're trying to pass in
multi-word parameters, such as a path with a space in it, PHP acts differently compared to what
you're used to for escaping the spaces.
For example, a base call to your script would be like this:
"c:\Program Files\php\php.exe" "c:\My Scripts\deleteall.php" *.bak c:\crap
If you need to give it a directory with a space, do not enclose the parameter in quotes (that just
confuses it), instead put a double quote in front of the space like so:
"c:\Program Files\php\php.exe" "c:\My Scripts\deleteall.php" *.bak c:\My"
Scripts\crap
This second version will have argv[1] = "*.bak" and argv[2] = "c:\My
Scripts\crap"
This holds true for both the cgi and cli versions.
----
Manual Page -- http://www.php.net/manual/en/features.commandline.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+38830
Delete -- http://master.php.net/manage/user-notes.php?action=delete+38830&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+38830&report=yes
Search -- http://master.php.net/manage/user-notes.php