- PHP
-
2008-06-02 - 更新:2015-11-07
この記事は最終更新日から1年以上経過しています。
<?php $id = "test"; $password = "test"; $sal = substr($id, 0, 2); $password_crypted = crypt($password, $sal); ?>
.htpasswd 例)Id:test Pw:test
test:teH0wLIpW0gyQ
.htaccess
AuthUserFile (.htpasswdまでの絶対パス) AuthGroupFile /dev/null AuthName "Please enter your ID and password" AuthType Basic <LIMIT POST GET PUT> require valid-user </LIMIT>
この記事がお役に立ちましたらシェアお願いします

1,297 views