Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我将方法存储在Z:\work\project\apps\controllers\_cron\tools\method
Z:\work\project\apps\controllers\_cron\tools\method
如何使用命令行调用“方法”?
简单如
C:\path\to\php.exe -f "Z:\path\to\file.php"
资料来源: 谷歌中“从命令行窗口运行 php”的#1 结果
You run the PHP executable with the location of the file as an argument (Windows example: php.exe path/to/method.php). The location of php.exe depends on where you installed it.
php.exe path/to/method.php
php.exe
Read more.