windows下php命令行参数
程序员文章站
2022-06-07 17:20:52
...
Microsoft Windows XP [版本 5.1.2600]
(C) 版权所有 1985-2001 Microsoft Corp.
C:\Documents and Settings\EVAN>cd c:\php5
C:\php5>php.exe cli.php uuu
PHP Warning: file_get_contents(uuu): failed to open stream: No such file or dir
ectory in C:\php5\cli.php on line 8
Warning: file_get_contents(uuu): failed to open stream: No such file or director
y in C:\php5\cli.php on line 8
cli.php
Code:
(C) 版权所有 1985-2001 Microsoft Corp.
C:\Documents and Settings\EVAN>cd c:\php5
C:\php5>php.exe cli.php uuu
PHP Warning: file_get_contents(uuu): failed to open stream: No such file or dir
ectory in C:\php5\cli.php on line 8
Warning: file_get_contents(uuu): failed to open stream: No such file or director
y in C:\php5\cli.php on line 8
cli.php
Code:
#!c:/php5/php -q array_shift($argv); if (count($argv) == 0) { $argv[0] = "php://stdin"; } foreach ($argv as $file) { $lines = split("\n", file_get_contents($file, "r")); shuffle($lines); foreach ($lines as $line) { if ($line !== "") { echo "$line\n"; } } } ?> |
推荐阅读
-
Windows环境下安装PHP Pear的方法图文教程
-
windows下配置apache+php+mysql时出现问题的处理方法
-
php $_SERVER windows系统与linux系统下的区别说明
-
windows下zendframework项目环境搭建(通过命令行配置)
-
php命令行(cli)下执行PHP脚本文件的相对路径的问题解决方法
-
windows下PHP_intl.dll正确配置方法(apache2.2+php5.3.5)
-
Windows下的PHP安装文件线程安全和非线程安全的区别
-
PHP中批量生成静态html(命令行下运行PHP)
-
php命令行使用方法和命令行参数说明
-
windows7下安装php的imagick和imagemagick扩展教程