[Help] PHP failed to execute the System Command. This post was last edited by leonli908 from 2013-04-0810: 48: 18. the function is to convert the image format through an external program (none of these writing methods works, shell can be successful, but 1 is returned through PHP, which indicates that the writing is incorrect. exec ("c:/Program & nbsp; Files/I [help] PHP failed to execute the System Command
This post was last edited by leonli908 at 10:48:18 on. function: convert the image format by using an external program (none of the several writing methods works. it can be successful through shell, but 1 is returned through PHP, indicating that the writing is incorrect)
exec("c:/Program Files/IrfanView/i_view32.exe c:/Program Files/IrfanView/03280009.sff /convert=c:/Program Files/IrfanView/4.tif", $result, $status);
echo $status;
exec("c://Program Files//IrfanView//i_view32.exe c://Program Files//IrfanView//03280009.sff /convert=c://Program Files//IrfanView//4.tif", $result, $status);
echo $status;
exec("c:\Program Files\IrfanView\i_view32.exe c:\Program Files\IrfanView\03280009.sff /convert=c:\Program Files\IrfanView\4.tif", $result, $status);
echo $status;
exec("c:\\Program Files\\IrfanView\\i_view32.exe c:\\Program Files\\IrfanView\\03280009.sff /convert=c:\\Program Files\\IrfanView\\4.tif", $result, $status);
echo $status;
PS: PHP? Help? System commands
------ Solution --------------------
Grant the general user the execution permission to C: \ Program Files \ IrfanView> I _view32.exe
------ Solution --------------------
"C:/Program Files/IrfanView/I _view32.exe
In this case, the red part is used as the parameter (equivalent to an incorrect doscommand), and the path contains spaces to use quotation marks.