Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.htpasswd add/remove/update usernames & passwords - php windows

Tags:

php

.htaccess

Can anybody tell me the simplest way (or suggest me a tutorial) to save / update / delete usernames and passwords in a .htpasswd file using php?? I am using php5 and Apache 2 in Windows.

like image 667
Alfred Avatar asked Dec 05 '25 20:12

Alfred


1 Answers

I like this:

Create file and add username:

htpasswd -c [filename] [username]

Add username into file or update users password:

htpasswd [filename] [username]

Delete user from file:

htpasswd -D [filename] [username]
like image 152
giordano Avatar answered Dec 08 '25 11:12

giordano



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!