Re: Include PHP library file in the .htaccess

From: Date: Fri, 30 Jan 2009 17:48:45 +0000
Subject: Re: Include PHP library file in the .htaccess
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-287430@lists.php.net to get a copy of this message
On Fri, Jan 30, 2009 at 12:41 PM, R B <rbpphp@gmail.com> wrote: > Hello. > > Supose that i have this script: > > <?php > > require_once("lib.php"); > > > lib_function(); > ?> > > I want to know if there is a way to call the lib.php library from the > .htaccess instead of the PHP script? > Thanks. > .htaccess won't call it since it isn't actually executed, but you can set up an auto_prepend_file in .htaccess that will be automatically prepended to all your PHP scripts in the folder (assuming the server config allows it). Andrew

« previous php.general (#287430) next »