execute a remote server php script from a windows batch file on command line
I have a php script on my hosted linux/unix server.I want to create a CLI for windows/linux both for executing my PHP script. for linux i can create a shell script that can execute my php script by using methods like url,curl). But how can i execute php script from a windows CLI (batch file). If any good suggestion for Linux CLI would be appreciated.
Thanks, Pankaj
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
You can download sh.exe (Bash) for win32 which will let you run the same script on both platforms. On windows then you only need to do
sh.exe script.sh
I use this method all the time because BAT programming is such a futile and terrible exercise in time-wasting.
http://unxutils.sourceforge.net/
EDIT: Oh wait, I thought you were trying to run a PHP script on a website (ie, via wget). I'm not sure what the implications of running PHP as CLI on win32 are.