[英]Running a .bat file from another server in PHP
I have a file - file.bat
- which is located on a different server than our web site. 我有一个文件
file.bat
它位于与我们网站不同的服务器上。 I'd like to be able to run this file within our site; 我希望能够在我们的网站上运行此文件; however, I'm not too familiar with .bat files, usage, etc. and was curious if anyone knows how I may be able to execute this from a different server?
但是,我对.bat文件,用法等不太熟悉,并且好奇是否有人知道我如何能够从其他服务器执行此操作?
.bat
or batch files are scripts. .bat
或批处理文件是脚本。 They need an interpreter to run, normally integrated into the shell/commandline. 他们需要运行解释器,通常会集成到shell /命令行中。
If you want to execute such a shell-script from remote, you need a remote-shell. 如果要从远程执行这样的shell脚本,则需要一个remote-shell。 You simply connect to the shell from remote and then you execute the shell-script in that shell.
您只需从远程连接到shell,然后在该shell中执行shell脚本即可。
So the other system that has the .bat
file in question must offer a remote shell you can connect to via PHP and then you're ready to go. 因此,另一个带有
.bat
文件的系统,必须提供一个远程外壳程序,您可以通过PHP连接到该外壳程序,然后就可以开始使用了。
However even if technically possible this does not mean that it makes sense. 但是,即使在技术上可行,这也不意味着就有意义。 What does the
.bat
file do? .bat
文件有什么作用?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.