开发者

How to run a php script with arguments from a batch file?

开发者 https://www.devze.com 2023-01-27 08:31 出处:网络
I hav开发者_高级运维e a php script named test.php in this file i have to pass one parameter using $argv.

I hav开发者_高级运维e a php script named test.php

in this file i have to pass one parameter using $argv.

i want to create window batch file that require one argument or parameter and pass that parameter in php script.

forexample in Windows Dos

test.bat hello123

so hello123 is passed to test.php ($argv[1] is first parameter)

Can anyone help me to write batch file for this this kind of script?


@c:/path/to/php.exe test.php %1
0

精彩评论

暂无评论...
验证码 换一张
取 消