ETA: some suggested ini_set() , but I understand that this is a server-side setting; I need runtime independence. For example, three scenarios work simultaneously as follows: x.php uses 2k, y.php uses 4k, and z.php uses 8k.
How to programmatically set a limit on the maximum POST size based on a script (i.e. not on the server)?
For example, in Perl, simply doing this in each script, thereby allowing everyone to set their own limit at runtime:
I understand that in php.ini there is a parameter that limits the maximum POST size for all PHP scripts:
But I want to know how to do this based on a script (because each script will have its own limitations).
Note. Presumably, you can set a limit in Apache httpd.conf and / or in .htaccess, but I don't want to do this.
source share