csv file parsing and uploading is not working on server side
<p>I have written following code to parse the csv file. Its working locally but on remote server its not working.</p>

<pre><code>function uploadTrainees() {
    $csv = array();
    $tmpName = $_FILES['csv']['tmp_name'];
    //echo $tmpName;
    $fp = fopen($tmpName,'r');
    $fields = array('delegate_title', 'delegate_firstname', 'delegate_lastname', 'delegate_jobtitle', 'delegate_email', 'delegate_phone', 'is_bringing_own_laptop');
    $records = array();

    while ($record = fgetcsv($fp))
    {
        $records[] = array_combine($fields, $record);
    }
    fclose($fp);
}   
</code></pre>

<p>Explain me what is the problem and give me solution to solve the problem</p>
