Code works locally but not on website

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.

An update ignore the code above.

I have tracked the issue to the failure to store the session variable on the live site. The session variable is properly stored on my local server so I know the code is working correctly. I have checked phpinfo on my live site and session variables are enabled. This code was working perfectly a few hours ago and has now stopped.

Anyone got any bright ideas please? Server issue or what?

Sponsor our Newsletter | Privacy Policy | Terms of Service