Re: cold fusion to php conversion..
| From: | Chris Adams | Date: | Mon, 10 Jul 2000 18:20:10 +0000 |
| Subject: | Re: cold fusion to php conversion.. | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-5774@lists.php.net to get a copy of this message | ||
> >Cold fusion supports an 'application' structure by the inclusion of an
> >application.cfm file. What this means is that this application.cfm file
> >gets processed before any other .cfm file in that same directory, etc.
> >Very useful for authentication, setting of global type variables, etc.
>
> PHP doesn't have anything built in to do *exactly* what you want to do on
an
> application-by-application basis. Instead, what you have to do is use
> include (or require) within each page and put the path to this file. I
> converted a CF application to PHP and I did it this way. I found the path
> to the application.php file (as I called it) and then used this as a
> variable within all of my pages. Worked really well. Not quite as easy
as
> within CF, but did the same job and was easy enough to strip in across all
> my pages.
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.