Re: Limit folder (with subfolders) capacity
- From: Jerry Stuckle <jstucklex@xxxxxxxxxxxxx>
- Date: Thu, 24 Aug 2006 17:12:39 -0400
freduchi@xxxxxxxxx wrote:
Hi, I need sugestions.
I need to implement the next and I don´t know how to do it:
I am developing a website in which users are signed up and share
information(Messages, Photos...).
When a user is signed up, his data is stored in a database and he is
asigned with a folder.
What I need, is to limit the folder capacity of each user to a given
size(5 mb for example).
For now all users would have the same capacity.And that would be
enough for now.
I Can´t limit this by code, because I am using third party software,
in some services, and I cannot control It.
I have read about something disk quotas.I am not
familiar to this.Would it be useful for my needs?.
If not, Which is the best way to achieve this?.
The ideal for me would be to be able to limit the capacity of a given
folder(included subfolders) to a size, so when I create the folder in
my code, I would also limit its size to the desired capacity.
Note: I am using php5 and my hosting uses linux.
Thanks.
Sincerely - SPEASEMAR - Spain
www.speasemar.com
Disk quotas are a function of the operating system, not PHP. They will do what you want, but how to set them is OS dependent (and you may not be able to do it in your code due to OS or hosting company restrictions).
What I do is when they go to the upload page, I check how much space they have left in the directory, then set that as the maximum they can upload.
Of course this won't work if they use ftp or similar, but it works fine for uploading via html pages.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================
.
- References:
- Limit folder (with subfolders) capacity
- From: freduchi
- Limit folder (with subfolders) capacity
- Prev by Date: Re: Cannot connect to postgresql
- Next by Date: Re: PHP sending whitespace after headers?
- Previous by thread: Limit folder (with subfolders) capacity
- Next by thread: Re: Limit folder (with subfolders) capacity
- Index(es):
Relevant Pages
|
Loading