Reply to include question

Your name:

Reply:


Posted by Jon on 01/30/06 18:05

All,

I have a question regarding include files. I'm currently wanting to secure
all of the pages within a directory by having a login script that queries a
MySQL DB, and writes a session variable confirming the user is successfully
logged in.

Now, I've done this many times before, however I'm getting kind of sick of
putting the include file to check the session variable on EVERY page within
a directory. This is especially irritating if I for whatever reason want to
unsecure a directory, or change the structure of the login system - it
forces me to go into each file of the admin area and remove the call to the
file.

My question is: Is there a way to have PHP force an include file per
directory instead of just file? Maybe have a global file inside the
directory that will cascade the include to every page below? Or am I simply
forced to manually include the file on each page?

Thank you in advance.

Jon

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация