Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Is there a PHP Application...

Guest
Oct 06, 2006 Oct 06, 2006

Copy link to clipboard

Copied

I have worked on some coldfusion and I know that coldfusion supports "application.cfm" where you can place codes or login security. Those of you's reading this will understand what I mean by the "application.cfm" in ColdFusion.

What I like to know is there a equivalent type of code for php? If so, can you please explain step by step. Thank you.


AdonaiEchad
TOPICS
Server side applications

Views

310
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 06, 2006 Oct 06, 2006

Copy link to clipboard

Copied

AdonaiEchad wrote:
> I have worked on some coldfusion and I know that coldfusion supports
> "application.cfm" where you can place codes or login security.
>
> What I like to know is there a equivalent type of code for php?

There isn't an equivalent of application.cfm in PHP. The normal practice
is to include files explicitly using include().

If you control the server yourself, you could set auto_prepend_file in
php.ini, but that's not possible on a shared server. It's possible to
set auto_prepend_file on a per-directory basis, but it requires an
Apache server plus the permission to override Apache defaults.

Short answer: use include().

--
David Powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 06, 2006 Oct 06, 2006

Copy link to clipboard

Copied

LATEST
"AdonaiEchad" <webforumsuser@macromedia.com> wrote in message
news:eg5mhn$ng7$1@forums.macromedia.com...
>I have worked on some coldfusion and I know that coldfusion supports
> "application.cfm" where you can place codes or login security. Those of
> you's
> reading this will understand what I mean by the "application.cfm" in
> ColdFusion.
>
> What I like to know is there a equivalent type of code for php? If so,
> can
> you please explain step by step. Thank you.

David's answer is right on, but you might be interested in an article I
wrote for CMX (free for members) about using an application.php file to
handle site-wide things like logging in, $_GET/$_POST cleanup, validation,
session starting, etc:
http://www.communitymx.com/abstract.cfm?cid=54E52

I used the application.php file in Cartweaver and it simplified a lot of
things.

Tom Muck


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines