Re: Running an .exe on localhost

From: Date: Thu, 11 Jan 2001 07:30:55 +0000
Subject: Re: Running an .exe on localhost
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-33929@lists.php.net to get a copy of this message
> 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...

« previous php.general (#33929) next »