3
A
回答
1
您以该文件的位置作为参数运行PHP可执行文件(Windows示例:php.exe path/to/method.php
)。 php.exe
的位置取决于您安装的位置。
+0
我使用http://hotislab.com/codeigniter/user-guide/general/cli.html中介绍的methot,但是响应是html(主页)中的索引页。 $ php index.php工具方法 – 2013-02-27 14:55:57
+0
@globula_alba:你从来没有对codeigniter说过什么。 – 2013-02-27 14:57:00
1
易为
C:\path\to\php.exe -f "Z:\path\to\file.php"
来源: #1 result for "run php from command line windows" in google
相关问题
- 1. 从Heroku CLI运行脚本
- 2. 运行CLI php脚本执行位
- 3. 无限期运行PHP(CLI)脚本
- 4. 运行CLI命令使用PHP脚本
- 5. php:在CLI中运行时,php脚本如何重新启动?
- 6. 如何通过cli/php在fpm上运行php脚本?
- 7. 从PHP应用程序运行PHP CLI脚本
- 8. 如何从php API运行casperJS脚本
- 9. 如何从powershell-commandline运行php脚本?
- 10. 如何从PHP脚本运行grunt?
- 11. 如何从PHP脚本运行PHPUnit?
- 12. 如何在Windows CLI中运行PHP脚本
- 13. Shell脚本从CLI运行,但不是从Crontab运行
- 14. 如何绕过PHP脚本中的安全检查,如果从CLI运行?
- 15. WordPress的:有没有办法从PHP脚本运行cli命令?
- 16. 从PHP脚本运行bash脚本
- 17. 从脚本运行PHP
- 18. 从jquery运行php脚本
- 19. 从PHP脚本运行java
- 20. 从PHP运行Ruby脚本
- 21. 从php运行python脚本
- 22. 从PHP运行Python脚本
- 23. 从php运行bash脚本
- 24. 从php脚本运行tex
- 25. 从phpMyAdmin运行php脚本
- 26. 从PHP运行脚本
- 27. 从PHP运行shell脚本
- 28. 从php脚本运行dir2ogg
- 29. 从CLI运行脚本,但阻止运行时,包括
- 30. 用nohup在PHP上运行php脚本CLI
如果你的意思'method'字面上的一类方法,你将需要调用的脚本此方法,然后从CLI运行此脚本。 – 2013-02-27 13:58:23
@fab:可以做'-r'include(...); my_method();“'或类似的。 – eggyal 2013-09-06 12:07:23