I need PHP to open the command prompt, type a command into it, and run it.
The prompt is located at: C:/WINDOWS/system32/cmd.ex
e
The command is:
"C:/Program Files/gs/gs8.61/bin/gswin3
2c.exe" -sDEVICE=jpeg -dNOPAUSE -dBATCH -sOutputFile="C:/Documents
and Settings/Andrey/My Documents/xampp/htdocs/Pro
jectArchiv
e/albums/e
dit/pdftmp
".substr($
filename, 0, strlen($filename)-4).".jpg
\" "C:/Documents and Settings/Andrey/My Documents/xampp/htdocs/Pro
jectArchiv
e/$image"
I am trying:
$cmd = "C:/WINDOWS/system32/cmd.e
xe \"C:/Program Files/gs/gs8.61/bin/gswin3
2c.exe\" -sDEVICE=jpeg -dNOPAUSE -dBATCH -sOutputFile=\"C:/Document
s and Settings/Andrey Grigoryev/My Documents/xampp/htdocs/Pro
jectArchiv
e/albums/e
dit/pdftmp
/".substr(
$filename,
0, strlen($filename)-4).".jpg
\" \"C:/Documents and Settings/Andrey Grigoryev/My Documents/xampp/htdocs/Pro
jectArchiv
e/$image\"
";
exec ($cmd, $output, $retval);
But it returns an error (and does something completely idiotic in addition)
What would be the proper syntax?
Thank you.