execute a remote server php script from a windows batch file on command line

发布于 2022-09-06 08:11:12 字数 382 浏览 18 评论 0

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

压抑⊿情绪 2022-09-13 08:11:12

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文