나는.htacess 파일로 보호 된 파일 액세스는 .htpsswd 파일에 저장된 암호를 사용하지 않았습니까?
내가 PHP 코드에 의해 AuthUserFile과에 기본 경로를 찾을 수 위의 코드에 의해 htaccess로 파일에 액세스 index.php 파일을 보호하기 위해 노력
AuthUserFile /home/username/public_html/.htpsswd
AuthType Basic
AuthName "restricted area"
<files "index.php" >
Require valid-user
</files>
젠토 루트에 그것을 시도
<?php
echo getcwd();
?>
여기 내 .htpsswd 파일의
admin:admin
암호를 입력 할 때마다 암호를 반복해서 묻는 팝업이 표시됩니다.
파일 이름이 잘못되었습니다. –