|
-
Sep 8th, 2003, 09:37 AM
#1
Thread Starter
Lively Member
Include and protected folders.
I have a page which I am using the include function.
I want to point that include to a password protected folder.
If I try to view the folder directly by typing the link. It pops up with the password box.
If I do the include, it doenst work and lets me view the file.
How can I get the include to view the protected folder and still ask for a username and password?
-
Sep 8th, 2003, 11:49 AM
#2
I don't think that's possible with PHP, although I could be wrong. When PHP is including the file, the HTACCESS files that protect the directory or file do not effect it. Again, I could be wrong, but I'm pretty sure that's how it is. You should just build a login and hide the files or something; there's lots to do.
-
Sep 8th, 2003, 01:59 PM
#3
Stuck in the 80s
I would also think that PHP doesn't have this functionality. I'm sure PHP assumes that if the script exists on the server, then it should have access to those files.
That's comepletely different than a random user navigating to the folder. By putting their script there or creating it, you're giving permission to access those files.
If you want to keep people from viewing portions of your script that include these files, like kows said, you'll probably need to build your own log in scripts, which isn't hard at all.
-
Sep 8th, 2003, 04:58 PM
#4
Lively Member
Can you demonstrate quickly how you passworded the folder? or is this for a non-windows box?
Thanks,
Mitchel
-
Sep 8th, 2003, 05:06 PM
#5
Stuck in the 80s
The .htaccess file can be used to password protect directories on *nix boxes, but not Windows.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|