Applescript launcher for PHP scripts
| From: | Ken Tozier | Date: | Tue, 06 May 2003 01:39:35 +0000 |
| Subject: | Applescript launcher for PHP scripts | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-146481@lists.php.net to get a copy of this message | ||
I wrote a few PHP 4.3.2RC1 photo processing scripts on Mac OS 10.2.5 that I'd like to either run as a droplet or have an AppleScript droplet somehow run the scripts when a user drags files onto it. The best I can figure is that I'll need to use Applescript's "do shell script" scripting addition to run a unix script which in turn runs a php script. Does anyone know of a better way to create a droplet just in unix to eliminate the Applescript step?
Also, after reading the CLI documentation for PHP, I find that although everything seems to be set up correctly for running scripts in CLI, doing a:
shell> ./my_photo_script
I get a line of output in the terminal that consists of a few lines of code in the class initialization routine then nothing happens. This script works just fine when run from a browser, what am I doing wrong? (NOTE: I did prefix the file with "#!/usr/local/bin/php <?PHP" so it should work, right?
Thanks for any help
Ken