Reply to Re: Limit folder (with subfolders) capacity

Your name:

Reply:


Posted by Jerry Stuckle on 11/26/59 11:56

freduchi@gmail.com 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@attglobal.net
==================

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация