[英]How to run a php script from windows .bat
This is what i want to do in a batch file: 这是我要在批处理文件中执行的操作:
FTP i have read before, it is possible to do it in a batch file. 我以前已阅读过FTP,可以在批处理文件中进行操作。 But i don't found a way to execute my php script on my linux server.
但是我没有找到在我的linux服务器上执行我的php脚本的方法。 Cronjob is not possible for this solution cause the uploaded file will be changed from Scipt and after i need it downloaded again.
Cronjob无法用于此解决方案,因为上传的文件将从Scipt更改,在我需要再次下载之后。
Any one has a solution? 有人有解决方案吗?
Thanks for help Phil 感谢您的帮助Phil
plink tool can be used to execute commands in Linux server from Windows through SSH
. plink工具可用于从Windows通过
SSH
在Linux服务器中执行命令。 Below is the syntax 下面是语法
plink.exe root@10.0.0.1 -pw password "<ur script execution command here>"
Say if I want to run a shell script I would type in the command "sh myscript.sh"
. 假设我要运行shell脚本,请键入命令
"sh myscript.sh"
。 To achieve this the Linux server should have sshd
running. 为此,Linux服务器应运行
sshd
。
The command can be used along with other commands part of the batch file. 该命令可以与批处理文件中的其他命令一起使用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.