duanchan9354 2014-04-10 02:31
浏览 40

如何使用PHP运行批处理文件?

i have tried opening .bat files in PHP using many syntax and they are working fine. It runs the file and stores the output. But im having a new problem in hand where i need to initiate a server program from PHP.

Lets say i have a the server program "server.java" and a client program "client.java". The server needs to be run first and then the client. I have created a batch file to run this server program as "server.bat". Is it possible to initiate this server.bat file from the PHP side and make it run in the background until the client finish its process?

  • 写回答

3条回答 默认 最新

  • duanmie9682 2014-04-10 02:35
    关注

    Try exec("psexec -d server.bat");

    评论

报告相同问题?

悬赏问题

  • ¥15 计算二重积分∫∫e^(x+y)dxdy,其中0≤x≤1,0≤y≤1,试分别用复合辛普森公式(取n=4)以及高斯求积公式(取n=4)计算积分 给出matlab程序
  • ¥15 opencv 无法读取视频
  • ¥15 用matlab 实现通信仿真
  • ¥15 按键修改电子时钟,C51单片机
  • ¥60 Java中实现如何实现张量类,并用于图像处理(不运用其他科学计算库和图像处理库))
  • ¥20 5037端口被adb自己占了
  • ¥15 python:excel数据写入多个对应word文档
  • ¥60 全一数分解素因子和素数循环节位数
  • ¥15 ffmpeg如何安装到虚拟环境
  • ¥188 寻找能做王者评分提取的