致命错误:迁移网站后调用未定义的函数page_header()

时间:2013-10-01 14:11:49

标签: php web

我已将我们的网站迁移到更新的服务器并不断遇到类似“致命错误:调用未定义函数page_header()...”的问题 这是index.php

<?php
require('includes/app_header.php');
authorize_user();
page_header();
?>
        <p align="center">&nbsp;</p>
    <p align="center"><span class="style3">Welcome to GEOTRACKER</span>.</p>            <p align="center">&nbsp;</p>
          <p align="center">&nbsp;</p>    <p align="center">  </p>     
<?  page_footer();  ?>

这是我的页面标题功能:

//draw common html header section
function page_header()
{
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>GEOTRACKER</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!--<script language="JavaScript" type="text/javascript" src="includes/rte/richtext.js"></script>-->
<script language="JavaScript" type="text/javascript" src="includes/functions.js"></script>
<!--<link rel="stylesheet" type="text/css" media="all" href="includes/jscalendar/skins/aqua/theme.css" title="Aqua" /> -->
<link rel="stylesheet" type="text/css" media="all" href="includes/jscalendar/calendar-brown.css" title="brown" />

<link rel="stylesheet" type="text/css" href="admin.css">
<style type="text/css">
<!--
body {background-color: #EEEEEE; margin-top: 10px; margin-bottom: 10px; margin-left: 10px; margin-right: 10px; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:8pt;}
.style3 {
    font-size: 14px;
    font-weight: bold;
    color: #0066FF;
}

div.frame_like {
  width:100%;
  height:150px;
  padding: 0 0 0 0;
  font-size: 1.2em;
  border: 1px solid #ddd;
  overflow: scroll; 
}

-->
</style>
</head>

<body style="font-family:Verdana, Arial, Helvetica, sans-serif;font-size:12px" bgcolor="#EEEEEE">
<table border="0" width="100%" cellspacing="0" cellpadding="9" align="center">
  <tr>
    <td bgcolor="#888888">
    <table align="center" border=0 bgcolor="#EEEEEE" cellspacing="0" cellpadding="0" width="100%">
    <tr>
            <td bgcolor="#999999" height="25" align="right" style="padding-right:15px">&nbsp;<?php if($_SESSION['logged']) {echo '<a href="logout.php" class="subtitle">logout</a>';} ?></td>
        </tr>
        <tr>
            <td bgcolor="#AAAAAA" style="padding-left:5px"><?php if($_SESSION['logged']) {echo site_navigation();} ?></td>
        </tr>
        <tr>
            <td height="300px" align="center" bgcolor="#E5E5E5" valign="top">
            <p>&nbsp;</p>
<!-- BEGIN OF SPECIFIC PART -->
<?
}

如果我只是手动插入它,这是有效的。

1 个答案:

答案 0 :(得分:0)

将代码的结尾更改为此

<!-- BEGIN OF SPECIFIC PART -->
<?php } ?>

该功能未被关闭