fgetcsv结果在本地和服务器上运行不同?

I used fgetcsv() to extract some data from a csv file. Here's the code:

<?php
$csv = fopen("csv/contracts.csv","r");
while(!feof($csv)){
    $line = fgetcsv($csv,1024);
    if($line[0] == '')
        continue;
?>
    <li><?php echo "$line[2] - $line[3]"; ?></li>
<?php
}
?>

This works perfectly in my local machine but it becomes a disaster when I upload it on my server! I passed $delimiter with "," to fgetcsv() but nothing changed!
What's wrong?
PHP Version:
On local: 5.3.5
On server: 5.2.17

[EDIT]
My local output is like this:

s1 - t1
s2 - t2
s3 - t3
s4 - t4

But on server:

-
-
s3 - 
s4 -

i think u tested the code locally in windows machine and the serve is linux. The file format in linux and windows are different . The end of line as well as some other things differ in linux from windows . Do u test your code in linux ( as ur server is linux ) and then try in server. i think it will work fine there...