Sure... sort of :)
This is what I do...
- in your webserver config file set auto_prepend.php to point to the
following file:
-----------------------------------------------------------------------
<?php
#
# This file is the first one read for every *.php request. It includes any
# other "auto_prepend.php" file found in the path of the requested URL.
#
#
# Loop through all the directories specified in the URL
# and include any files named "auto_prepend.php.
#
$_dirs = split("/", $PHP_SELF);
for( $_i=0; $_i < count($_dirs); $_i++ ) {
$_dirPiece .= "/" . $_dirs[$_i];
if( $_dirPiece == "/" ) {
$_dirPiece = "";
}
$_file = $DOCUMENT_ROOT . $_dirPiece . "/auto_prepend.php";
if( @file_exists($_file) ) {
include($_file);
}
}
?>
-----------------------------------------------------------------------
Now if any directory contains a "auto_prepend.php" file it will be
included automatically.
Sure it's a little bit of overhead, but it sure makes life more
convenient.
-philip
On Tue, 11 Dec 2001, christian calloway wrote:
> Hey everyone,
>
> In coldfusion, if you have a file named Application.cfm in the same dir as
> the script that is currently executing, then the coldfusion server will
> automatically include that file in beginning of every script in that
> directory. Is there any way, by manipulating the php config settings, to
> accomplish the automatic inclusion of code libs? Thanks,
>
> Christian
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]