Only variables should be passed by reference
<pre><code>// Other variables
    $MAX_FILENAME_LENGTH = 260;
    $file_name = $_FILES[$upload_name]['name'];
    //echo "testing-".$file_name."&lt;br&gt;";
    //$file_name = strtolower($file_name);
    $file_extension = end(explode('.', $file_name)); //ERROR ON THIS LINE
    $uploadErrors = array(
        0=&gt;'There is no error, the file uploaded with success',
        1=&gt;'The uploaded file exceeds the upload max filesize allowed.',
        2=&gt;'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form',
        3=&gt;'The uploaded file was only partially uploaded',
        4=&gt;'No file was uploaded',
        6=&gt;'Missing a temporary folder'
    );
</code></pre>

<p>Any ideas? After 2 days still stuck</p>
