I am working on a php app and this is my code:
<html>
<head>
<meta charset="UTF-8" />
</head>
<?php
if (isset($_POST['PLAY']))
{
exec("open /Applications/Chess.app");
}
?>
<form method="post">
<button name="PLAY">Play Chess</button><br>
</form>
</html>
But when I run it, and press the button the Application does not open. Thanks for any help!
/Applications/Chess.app
尝试之前有一个空格
exec("open/Applications/Chess.app");
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.