Php exec-不使用参数
我需要使用Php exec-不使用参数,php,cmd,exec,Php,Cmd,Exec,我需要使用exec() 它的工作原理是: exec('C:\ProgramFiles(x86)\Google\Chrome\Application\Chrome.exe') 它没有: exec('C:\ProgramFiles(x86)\Google\Chrome\Application\Chrome.exe--headless--disable gpu--screenshot=D:\file211.png--window size=19201200http://google.com) 如何在e
exec()
它的工作原理是:
exec('C:\ProgramFiles(x86)\Google\Chrome\Application\Chrome.exe')代码>
它没有:
exec('C:\ProgramFiles(x86)\Google\Chrome\Application\Chrome.exe--headless--disable gpu--screenshot=D:\file211.png--window size=19201200http://google.com)
如何在exec中设置参数?:
注意:在Windows上,exec()将首先启动cmd.exe以启动
指挥部。如果要启动外部程序而不启动
cmd.exe将proc_open()与旁路外壳选项一起使用
也可以使用popen()代替proc_open():
$handle=popen('C:\ProgramFiles(x86)\Google\Chrome\Application\Chrome.exe--headless--disable gpu--screenshot=D:\file211.png--window size=19201200http://google.com","r",代码>