Notice: Undefined offset: 1 in line 60
Posted: Wed Feb 23, 2011 1:15 pm
i get the error for this code:
i know that this means that the array gets one argument instead of two but i do'nt know how to solve it...
this code works fine in my localhost but not on the server
Code: Select all
<?php
$news = fopen("test.txt", "rb");
while (!feof($news) ) {
$line = fgets($news);
$parts = explode('=', $line);
print $parts[0] . $parts[1]. "<BR>";//line 60!!!
}
fclose($news);
?>this code works fine in my localhost but not on the server