Access all Area (nope)

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Access all Area (nope)

Post by Gen-ik »

This question has probably been asked more times than "what's the meaning of life?" but I have been through a shed-load of topics and can't find an answer to this question.

On my server I have a folder (called fonts) which is full of my own fonts (surprise). Now, the folder is protected using a standard (.hta?) username and password.

I am trying to find out how to supply the username and password (so I can access the folder) from within a function or class (I am using the fonts for GD bits and bobs) and then remove the permissions to stop the visitor being able to access the fonts folder after the script has finished.


Help as usual would be great.

Thanks.


PS. If there's an easier way to protect the folder (chmod maybe?) then any info on that would be cool too.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

I am trying to find out how to supply the username and password (so I can access the folder) from within a function or class
I'm not quite sure what you mean but if you're refering to a php-function/class note that your script is not affected by .htaccess restrictions. They only apply to http-requests. Your script's ability to access files is only limited by permissions set on the filesystem-level (except safemode)
Post Reply