Re: Adding a single php file to .htaccess.

From: Date: Sun, 24 Aug 2008 14:50:21 +0000
Subject: Re: Adding a single php file to .htaccess.
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-278589@lists.php.net to get a copy of this message
On 24 Aug 2008, at 15:39, Dotan Cohen wrote:
2008/8/24 Stut <stuttle@gmail.com>:
In theory all you need to do is add a hash-bang line to the start of the PHP scripts. This should work... #!/usr/bin/env php
Thanks, that's what I am doing right now. I was hoping to avoid that for portability, but if it is unavoidable then I can live with it. Thanks!
If you use env then it should be pretty portable. The only other way to do it would be to specify each script individually or with a regex if that's possible in httpd.conf or .htaccess using a Files section to tell Apache to execute it with PHP. I don't see that as any more portable. -Stut -- http://stut.net/

« previous php.general (#278589) next »