By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,713 Members | 1,531 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,713 IT Pros & Developers. It's quick & easy.

CLI and Windows

P: n/a
The portion of the PHP manual entitled "Using PHP from the command
line"
states that "The CGI SAPI supports the CLI SAPI behaviour by means of
the -C switch when run from the command line.":

http://us2.php.net/features.commandline

However, "php -h" says of the -C switch, "Do not chdir to the script's
directory".

Further, running php -Cr "echo 'test';" results in an error saying
that
the -r switch doesn't exist, even though it should if it were acting
like the CLI version.

This, coupled with the fact that the Windows installer doesn't seem to
install a seperate CLI exe means that, unless I'm missing something,
CLI isn't something that can be used on Windows, contrary to what the
docs say.

Am I missing something?
Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
yawnmoth wrote:
The portion of the PHP manual entitled "Using PHP from the command
line"
states that "The CGI SAPI supports the CLI SAPI behaviour by means of
the -C switch when run from the command line.":

http://us2.php.net/features.commandline

However, "php -h" says of the -C switch, "Do not chdir to the script's
directory".

Further, running php -Cr "echo 'test';" results in an error saying
that
the -r switch doesn't exist, even though it should if it were acting
like the CLI version.

This, coupled with the fact that the Windows installer doesn't seem to
install a seperate CLI exe means that, unless I'm missing something,
CLI isn't something that can be used on Windows, contrary to what the
docs say.

Am I missing something?


I use the CLI under Windows all the time. In <5 it was under it's own
folder called something like CLI, and with 5 php.exe is the CLI.
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.