我正在尝试使用输入文件和参数运行 .exe 应用程序。
使用 cmd 我可以像这样成功启动可执行文件...
C:\Program Files\MyApp.exe "path\to\input file" argument
但是,当我像这样简单地将上面的字符串复制粘贴到 exec() 函数中时,什么也没有发生。
exec("C:\Program Files\MyApp.exe "path\to\input file" argument")
我需要转义部分字符串吗?我应该如何进行?