-
Website
http://www.phpfour.com/blog -
Original page
http://www.phpfour.com/blog/2007/07/23/htpasswd-protection-library-for-code-igniter/ -
Subscribe
All Comments -
Community
-
Top Commenters
-
robskils
1 comment · 1 points
-
joshsharp
1 comment · 1 points
-
nirjhar
1 comment · 1 points
-
Nhm Tanveer Hossain Khan
1 comment · 1 points
-
cubanhenry5
1 comment · 1 points
-
-
Popular Threads
ServiceAuthentication
or
AuthHtpasswd
Thanks! :)
but i check the $this->load->library('AuthHtpasswd');
is ok . But i do not know why it gets error. However to check your example i try it different way $auth=new AuthHtpasswd();
and it works. but i know it must be work , in the way done. Can u tell me what type mistake may be i have done to run your script.
Thanks
http://saidur.wordpress.com
Thanks for your reply. I've just found the problem - while Code Igniter loads any library, it puts the name in small case. So, instead of calling $this->AuthHtpasswd->protect(..), please call $this->authhtpasswd->protect(..).
I have made change to the code and re-uploaded it.
Thanks
nice to see you continuing your blog :)
just a small tip -
"class Protect extends Controller"
as i can see your "Protect" class has extended "Controller"
so you should name like this -
"ProtectedController"
or "SecureController"
or "AuthenticateController"
hope that will be in help.
best wishes,
you don't need to put @author tag with every function :)
instead try once on the top class level.
Thanks for your suggestions ! I will keep the @author thing in mind for future use.
Regarding the controller name, Code Igniter requires writing controller name without the Controller suffix, as this becomes a part of the url:
http://www.domain.com/protect/index
Thanks for your comments, its been long you've visited my blog :)
Cheers!
thank you for mentioning about the Code Ignitor specific convention. i didn't know that, how is going everything ? how is going study and new company ???
hope will c you soon.
best wishes,
Study is almost done...final exams of the last sems remaining and then the internship.
Company is doing well by the grace of Almighty. We're working with cool, new stuffs and discovering new things every now & then. And our 2nd recruitment is going on, possibly new team will start from Oct 1.
Will come to swi next week, will meet then. Take care!
After a successful subscription through your registration form OR admin panel, take an array of all the valid users from DB and use the class to create the .htaccess file for the folder.
Also, when a subscription is over, OR an user is deleted from admin panel, do the same to update the .htacess file.
Hope this helps.