> Can somebody please give me a starter in trying to run a local application
> (.exe) from a html button eg. Does it involve exec() or system() ? And if
> so, could somebody give me an example. I'm too dim to learn any other way
;)

exec("C:/program files/whatever/full/path/something.exe", $output, $error);
while (list(,$line) = each($output)){
    echo $line, "<BR>\n";
}
if ($error){
    echo "OS Error $error.  Usually path/permissions.<BR>\n";
}

If the exe takes args, just tack them on after .exe:

$arg1 = 'foo';
exec("C:/.../something.exe $arg1", $output, $error);

You can have your HTML buttons choosing what to run by making the exe path a
variable or...



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to