سؤال

I want make a check against the IIS upload limit of the server my PHP script is running in the same manner as ini_get('upload_max_filesize') works for the PHP settings.

I'm thinking about parsing the web.config file to get the value of maxAllowedContentLength, but I was wondering if there is a standard way to ask the webserver directly.

هل كانت مفيدة؟

المحلول

There is one link telling a bit about other configuration setting you should read Which gets priority, maxRequestLength or maxAllowedContentLength? And i dont think there is other way as to read the ini file (php have simple ini file reader). I could propose using some library that splits files like plupload - it can split your files to smaller pieces, upload each piece and then recombine it into one big file bypassing the server maximum upload file / body limits.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top