28, May 2012

Make include access_user_class.php more dynamic - webmaster forum

 
Webdigity webmaster forums
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  Access_user Class (Moderator: Olaf)
Topic: Make include access_user_class.php more dynamic
« previous next »
Pages: [1] Print

Author Topic: Make include access_user_class.php more dynamic  (Read 1928 times)
Chicken-run Manager
*
Posts: 9
66 credits
Members referred : 0


« on: Mar 19, 2007, 01:50:36 pm »

Greetings:

I tried to do this:
include($_SERVER['DOCUMENT_ROOT'].$sec_path."access_user_class.php");
but it's not working the way I wanted.

I am trying to make the access_user_class.php include line in everypage more dynamic. So it will allow me to move/change the "classes/access_user" to for example "protected" by changing the config file $sec_path.

Is there a solution for this?

Thanks
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #1 on: Mar 19, 2007, 11:21:41 pm »

Greetings:

I tried to do this:
include($_SERVER['DOCUMENT_ROOT'].$sec_path."access_user_class.php");
but it's not working the way I wanted.

I am trying to make the access_user_class.php include line in everypage more dynamic. So it will allow me to move/change the "classes/access_user" to for example "protected" by changing the config file $sec_path.

Is there a solution for this?

Thanks

you need to study the PHP include function, there are different ways to include php files.

The pathes inside the config file are important for redirections

Cyberpunk Wannabe
*
Gender: Male
Posts: 43
280 credits
Members referred : 0


Lolo means Grandpa in the Philippines!


« Reply #2 on: Mar 25, 2007, 07:51:47 am »

Greetings:

I tried to do this:
include($_SERVER['DOCUMENT_ROOT'].$sec_path."access_user_class.php");
but it's not working the way I wanted.

I am trying to make the access_user_class.php include line in everypage more dynamic. So it will allow me to move/change the "classes/access_user" to for example "protected" by changing the config file $sec_path.

Is there a solution for this?

Thanks
Are all your files/scipts in the same directory?  If yes, then you could just do something like this...

Just delete what is in red...
include($_SERVER['DOCUMENT_ROOT']."/classes/access_user/access_user_class.php");

It will now say...

include("access_user_class.php");
That is dymanic as it gets!

Chicken-run Manager
*
Posts: 9
66 credits
Members referred : 0


« Reply #3 on: Apr 16, 2007, 09:24:19 pm »

Yes, right now they are all in the same directory. So, your suggestion will work well.
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=6257
Tags : dynamic include Bookmark this thread : Digg Del.icio.us Dzone more....

Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  Access_user Class (Moderator: Olaf)
Topic: Make include access_user_class.php more dynamic
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 06:58:34 pm





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!






Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2012 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.