Problem with the fgetcsv() in php
<p>I have the following piece of code to parse a csv file. After that I am displaying it. The .csv  file is displaying perfectly on my local  machine but on the server after clicking on upload a blank page is displaying.</p>

<pre><code>function uploadTrainees()
{
    $csv = array();
    $tmpName = $_FILES['csv']['tmp_name'];
    //echo $tmpName;
    //ini_set('auto_detect_line_endings',true);
    $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,1000,','))
    {
        $records[] = array_combine($fields, $record);
    }
    fclose($fp);
}
</code></pre>

<p>Help me to solve this issue.</p>
