The code I'm using is:
$strData = "";
if ($resFile = @fopen($strFilename, "rb")):
do {
$strBuffer = @fread($resFile, 8192);
if (strlen($strBuffer) == 0):
break;
else:
$strData .= $strBuffer;
endif;
} while(TRUE);
@fclose($resFile);
return $strData;
else:
return FALSE;
endif;
I've done a little more testing and it seems that if I use this:
<html>
<head>
<title>Download Login</title>
</head>
</html>
It works, but if I use this:
<html>
<head>
<title>Download Login</title>
<meta name="Keywords" content="download,login" />
</head>
</html>
it doesn't work, but if I take out the content bit of the meta tag, it works again. This is with the extension as both .htm and .txt.
It seems that something is interpreting the text instead of just passing through as plain text.
What I'm tryng to do is read the html file (the real one contains php code too) and interpret it on this server rather than the one where it's stored.
To do this, my thinking is that I need to read it as text first then eval it, but fopen/fread doesn't seem to be reading it as plain text.
Debbie-Leigh