Forgot Password / Register
Site Statistics
Total Members: 520
Total Tutorials: 242
Newsest User: 8884244477
Todays Unique Hits: 97
0 Users 5 Guests Online
Forum Index » PHP + MySQL » PHP + .htaccess
Posted on Saturday 19th May 2007 at 12:17 AM
Diablosblizz
templates/default/images/noavatar.png's Avatar
Senior Member
Alright, this might be a long post, and I don't know if this is even possible. Heres what I want to do:

I want to fopen a folder, which is password protected by .htaccess. Now, when I try to open the folder, I get this message:

Code

Warning: fopen(http://myip/forbidden/database/vouchers) [function.fopen]: failed to open stream: HTTP request failed! HTTP/1.1 401 Authorization Required in /home/diablosb/domains/hotelmario.info/public_html/members/shop.php on line 25



I think what that means, is that when the server is trying to open the folder, it is being asked to enter the username and password, which is not poping up.

The reason I am password protecting it is because there is important files there, they NEED to be there.

My question is:

How do I get php to open the folder using the username and password I put in the .htaccess.

I really hope that this is possible and compatible with fopen.

Thanks!!