Re: cold fusion to php conversion..

From: Date: Mon, 10 Jul 2000 18:36:57 +0000
Subject: Re: cold fusion to php conversion..
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-5777@lists.php.net to get a copy of this message
> > Note that the PHP configuration directives auto_prepend_file and > > auto_append_file can be used to have PHP automatically include a file at > the > > start or end of your document. Setting auto_prepend_file to your include > > file should be almost exactly equivalent to Cold Fusion's application.cfm. > > Am I right (I've been wrong plenty of times though!) in thinking that this > auto_prepend will work for EVERY file on the server? application.cfm only > works from one directory and then downover. SO, for example, if someone had > a directory called "press_releases" and this had an application.cfm file, > any other directory within press_releases would also have access to the > global application.cfm file That's correct only if you set it in php.ini. In apache, you can set it in your site's configuration section (specific to a single site) or using something like Location in httpd.conf or .htaccess to set it for a given directory (and its children). On IIS, you set a registry key based on the directory: [HKEY_LOCAL_MACHINE\SOFTWARE\PHP\Per Directory Values\D\SomeDirectory\On\Drive\D] "auto_prepend_file"="foo.php"

« previous php.general (#5777) next »