简体   繁体   中英

exec command not working (php)

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM