php - how to catch error "Maximum number of allowable file uploads has been exceeded"
<p>I can't seem to catch this just by using PHP. This is what I did:</p>

<pre><code>$maxFiles = (int)ini_get('max_file_uploads');

if ($maxFiles &lt; count($_FILES['name'])) {
    echo 'ERROR';  
}  
</code></pre>

<p>But <code>count($_FILES['name'])</code> is always equal to <code>$maxFiles</code> (if the error occurs). 
And I really don't want to change the condition to <code>==</code> ... it doesn't seem right. </p>
