I have exactly the same code on my local Wampserver as on my website. The local code works correctly the remote code doesn’t. Both using the exact same input file.
Anyone got any bright ideas please?
[php]
$file_handle = fopen($input, “r”);
while (!feof($file_handle) ) {
$record = fgets($file_handle);
//echo “[”. $record . “]”;
if (strpos($record,“1 NAME”)!==false){
//echo “".$test."”;
//echo “found name”;
$s = explode("/",$record);
for($i=1;$i<=count($s)-1;$i+=2){
$data .= $s[$i]." ";
}
}
}
[/php]
It seems to me that on the remote 1 NAME is not found in the string even though it is present.