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:
Posts: 6691
34714 credits Members referred : 374
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:
Posts: 43
280 credits Members referred : 0
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