Required File Not Working properly ! |
[eluser]osama[/eluser]
Hi, friends i have two simple pages admin_check.php and dashboard.php I'm using the admin check file to protect my admin pages so i put a very simple code in it to know if the user logged in or not then I'm using this file ( admin_check) in other files to do the log in check process but it's not working when i require it in other files This is admin_check code : Code: <?php and This is The dashboard Code : Code: <?php Logically When i go to htttp://localhost/codeigniter/index.php/dashboard it should redirect me to log in page But it doesn't so I'm Wondering what's Wrong ?:coolsmirk:
[eluser]Clooner[/eluser]
You are overriding the index method! And this is not the preferred way to extend a controller. Please read http://ellislab.com/codeigniter/user-gui...aries.html especially the part about Extending Native Libraries. Go try that after reading the userguide and have another go at it.
[eluser]solid9[/eluser]
try, htttp://localhost/codeigniter/index.php/dashboard/admin_check/ |
Welcome Guest, Not a member yet? Register Sign In |