I have a pretty simple PHP script that I am developing.
Any page on my site, located at www.sesgalaxy.f2s.com, contains the following code:
<? require '/web/sites/279/sesgalaxy/www.sesgalaxy.f2s.com/r/brain.php';
siteHeader("NameOfPage");
?>
<!-- HTML for NameofPage goes here -->
<?
siteFooter();
?>
The contents of the brain.php are:
<?php
function make_link ($url, $linktext=false, $target=false) {
return sprintf("<a href=\"%s\"%s%s>%s</a>",
$url,
($target ? ' target="'.$target.'"' : ''),
($linktext ? $linktext : $url)
);
}
function print_link($url, $linktext=false, $target=false) {
echo make_link($url, $linktext, $target);
}
function line($true="1") {
if (!$true) {
return '<table height=2 cellspacing=0 cellpadding=0 width="100%" border=0 bgcolor="#000033"><tbody><tr><td></td></tr></tbody></table>';
}
function siteHeader($title=""){
echo $title;
?>
<head><title>Los Banos Online - <? if ($title) echo "$title";?></title>
<META name="description" content="Los Banos City Website. A tourists guide to Los Banos, city news and events, the community of Los Banos online hub.">
<META name="keywords" content="los banos, city, california, ca, education, state, department, government, merced, county">
<META name="robots" content="index,follow">
<link rel="stylesheet" href="/css.css" type="text/css">
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" link="#FFFFFF" vlink="#FFFFFF">
<?php
}
function siteFooter() {
echo "</body>";
}
===============================
Now, for some odd reason, I try to open up www.sesgalaxy.f2s.com/delta.php (delta.php would contain the first coding, not the brains)in my browser, and I get two error messages.
/web/sites/279/sesgalaxy/www.sesgalaxy.f2s.com/
Parse error: parse error in /web/sites/279/sesgalaxy/www.sesgalaxy.f2s.com/r/brain.php on line 34
Fatal error: Call to undefined function: commonheader() in /web/sites/279/sesgalaxy/www.sesgalaxy.f2s.com/delta.php on line 3
Why does this happen???
Please help,
Kevin Smith