dqb77047 2014-02-04 13:09
浏览 153

如何从Windows .bat运行PHP脚本

This is what i want to do in a batch file:

  1. write a file to ftp folder
  2. run php script (http://mylocation.url/script.php)
  3. download a file from ftp folder

FTP i have read before, it is possible to do it in a batch file. But i don't found a way to execute my php script on my linux server. Cronjob is not possible for this solution cause the uploaded file will be changed from Scipt and after i need it downloaded again.

Any one has a solution?

Thanks for help Phil

  • 写回答

1条回答 默认 最新

  • dpcyx08288 2014-02-04 13:18
    关注

    plink tool can be used to execute commands in Linux server from Windows through SSH. 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". To achieve this the Linux server should have sshd running.

    The command can be used along with other commands part of the batch file.

    评论

报告相同问题?

悬赏问题

  • ¥15 运筹学排序问题中的在线排序
  • ¥30 求一段fortran代码用IVF编译运行的结果
  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 lammps拉伸应力应变曲线分析
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥15 请问Lammps做复合材料拉伸模拟,应力应变曲线问题
  • ¥30 python代码,帮调试,帮帮忙吧