Hi, I'm trying to call a batch file from PHP after a file has been uploaded. If I go to a command prompt on the machine it works properly but wont work from the web server. As I have never done this before can anyone help.
Here is the code I am using:-
$file_dir="c:/inetpub/wwwroot/pdf/";
$name=$file_dir.$fupload_name;
if (isset($fupload) )
{
copy ( $fupload, "$file_dir/$fupload_name") or die ("Could not copy");
}
Print "<h2>File Copied</h2>";
Print"<br><br><br>";
exec("cmd.exe http://djvkir1psv1/cgi-bin/bin/ps2pdf.bat ".$name." ".$file_dir."test.pdf");
In case you are wondering I am trying to get my website to convert .ps files to .pdf's 🙂
Thanks a lot folks.
Neil