Hi all,
I have used PHP3 in the past, however only to do simple things. I use it mainly to load fragments of pages for simplicity on my end.
I recently installed PHP4, thinking that the way that code was parsed would be the same. Well, it isn't, some things just don't work. I used PHP3 a number of years ago, I am trying to resurect an old site of mine. I am unsure of what is wrong, but i can post a sample page of what is supposed to be going on and maybe you guys can help me figure it out.
<?php
$myfile=$QUERY_STRING;
$string=$QUERY_STRING;
require("detect.php3");
require("localnav.php3");
if($myfile!="" && file_exists($myfile))
{
$t=fopen($myfile,"r");
$tc=file($myfile);
fclose($t);
$location=$tc[0];
$title=$tc[1];
$content="";
for($x=2; $x<count($tc); $x++)
{ $content.=$tc[$x];
}
}
else
{
$title=("Sorry, File not Found.");
$content.=("<div align=\"center\">That page does not exist, use the link below to go to the main page.</div><br><br>\n");
$content.=("<div align=\"center\"><a href=\"index.php3\";>Go back.</a></div>\n");
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html>
<head>
<title>Coolman's Homepage - <?php print $title?></title>
<link href="global.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0">
<?php include("header/index.htmlf"); ?>
<?php include("middle/index.htmlf"); ?>
<tr>
<td valign="top">
<?php print $content; ?>
</td>
</tr>
<?php include("footer/index.htmlf"); ?>
</div>
</body>
</html>
Then when I load the page on my apache server, I get these errors
Warning: main(/localnav.htmlf): failed to open stream: No such file or directory in I:\cdeli\middle\index.htmlf on line 11
Warning: main(): Failed opening '/localnav.htmlf' for inclusion (include_path='.;c:\php4\pear') in I:\cdeli\middle\index.htmlf on line 11
Not sure if this is all going to post or not but here goes nothing.