php打开外部应用

使用exec和system函数

1.exec("start 程序路径"); // 执行外部程序

exec("start D:\install_address\WeChat\WeChat.exe");  // 开启微信,但是会导致php一直运行,除非关闭微信

2.system(程序路径); // 执行外部程序并显示输出

$result = system("D:\install_address\WeChat\WeChat.exe");  
返回 0为成功 1为失败
posted @ 2021-09-07 16:15  _lizhipeng  阅读(41)  评论(0)    收藏  举报