How to make it run the `exec()` command in PHP to edit some file in Mac OS X?
问题 When I have this PHP script. <?php exec('/usr/local/bin/mate hello.txt'); ?> It doesn't work on web browser with http://abc/hello.php, for example. The command of mate is 'TextMate app', and it's just for editing hello.txt. Is this some php permission problem? I just need to run some commands on my local web server (I'm the only user), so I can open the permission to run this seemingly dangerous exec() function. Q : How can I make it run the PHP exec() function? I use Mac OS X 10.6.6/Apache