how to allow php script only access a directory?

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
nixan
Forum Newbie
Posts: 2
Joined: Wed Jan 14, 2009 11:03 pm

how to allow php script only access a directory?

Post by nixan »

Hai everyone.
im new to this forum.im developing a system which is allow the system admin to create user.And also for the user the admin can upload documents(doc,pdf, ect..).When a user login he/she will have list of documents which are uploaded for them.
My problem is there may be one user try to get other's document by typing the url.to over come that i want only the script can access the folder which hold the documents.
I have try two methods which are not fully successful.

01. try with .htaccess file which which gave me an "Internal Server Error".
02. store the documents beyond htdocs folder.but the problem is im also dont have permission to access beyond htdocs. this one is very good but not suitable for me.

is there any way to solve my problem.
Thanks in advance.
Post Reply