On 11/8/2011 6:53 AM, Ashley Sheridan wrote:
Sorry for this slightly off-topic post and it not being connected to
the thread that it originally came from, but I remember Tedd was
asking about this.
That's true, especially if there is a bang path statement such as
"#!/usr/bin/php" at the top of the file.
I'd thought that the executable flag on files didn't do anything for
things like PHP files, etc, but I've just found something that says
otherwise. Seems that in some Linux systems when using the GUI, there
is a switch (in Nautilus at least) that will run a text file if it has
the executable flag rather than open it in a text editor, which seems
to override the default file association behaviour.
If you set the executable flag on a php file with the bang path at the
top, Linux will happily start php and execute the file. I have lots of
little apps and scripts that I've written to work from the command line
that way. On top of that, PHP executes so much better than Perl that I
don't write much in Perl any more. I just wish PEAR had better
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php