-2

Hello everyone i have question that can help me very much.

In php can we create a space limit to the folder that on server to upload the data in that particular folder.

please help me

thanx in advance.

  • Are you talking about a php file upload? – Varol May 07 '12 at 03:18
  • This can be done either with your OS tools for quotas on your file system, or within your application. Either way, you'd need to be much more specific before a proper answer could be given. – Brad May 07 '12 at 03:19

2 Answers2

2

You can fake it by checking how much stuff is in a folder before "accepting" a new upload, but PHP itself does not have any kind of quota support - that's done at the file system level by the the operating system PHP is running under.

Marc B
  • 356,200
  • 43
  • 426
  • 500
1

Just substract the size of the current folder from the quota size and compare to the size of the uploaded file.

Community
  • 1
  • 1
Mahmoud Al-Qudsi
  • 28,357
  • 12
  • 85
  • 125