How would I have a button on a local webpage (running locally on localhost) to open a local application on OSX?
I have looked through some answers for windows but can't figure out how to get it to work on OSX.
How would I have a button on a local webpage (running locally on localhost) to open a local application on OSX?
I have looked through some answers for windows but can't figure out how to get it to work on OSX.
I'm using MAMP on my Mac OS X (high sierra), and in PHP the code is :
$command = '/Applications/Safari.app/Contents/MacOS/Safari';
$escaped_cmd = escapeshellcmd($command);
system($escaped_cmd);
Have tested this and it does work in opening up the application locally. You can even call it from the Terminal to test if it works after creating the above code in a .php file.
Example in Terminal on Mas OS X:
php theabovecode.php