Php include/$_GET error

Status
Not open for further replies.

SupremeCoder

New Member
Mar 14, 2011
15
4
Hello people my CMS have an error
Picture:
ukasJgKdiCa0.png

Code of site.php:
PHP:
<?php
if(isset($_GET['header'])) {
echo '
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Hotel is on Maintenance</title>
<script language="javascript" type="text/javascript">
var SITEURL = "<?php echo SITEURL; ?>";
</script>
<link href="assets/front.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="assets/jquery.js"></script>
<script type="text/javascript" src="assets/jquery-ui-1.8.13.custom.min.js"></script>
<script type="text/javascript" src="assets/global.js"></script>
<script type="text/javascript" src="assets/tooltip.js"></script>
<link href="assets/smoothness/jquery-ui.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
$(document).ready(function() {
      $("input[type="checkbox"]").ezMark();
      $("input[type="radio"]").ezMark();
      $("#imgfile").fileinput();
   
    $("#news").hide();
    $("#shownews").click(function () {
      $("#news").toggle("slide",500);
    });
 
});
</script>
</head>
<body>
<div class="wrap">
<div id="msgholder"></div>
  <div id="content">
    <span id="loader" style="display:none"></span>';
    }
?>
<?php
if(isset($_GET['footer'])) {
echo '
    <div id="footer">
        SupremeBooter Copyright @ 2012
    </div>
</div></center>
</body>
</html>';
}
?>
 

Markshall

Русский Стандарт
Contributor
Dec 18, 2010
2,637
2,389
Basically it's saying that 'site.php' doesn't exist in the directory, is site.php in a different directory to the file that you are including it into?
 

Markshall

Русский Стандарт
Contributor
Dec 18, 2010
2,637
2,389
Well there's your problem.

If site.php is in a folder called 'inc' or whatever, in your code that you're including the file into, you need to do

PHP:
include("inc/site.php?header");

etc
 

SupremeCoder

New Member
Mar 14, 2011
15
4
Maintenance:
PHP:
<?php include './site.php?header'; ?>
<div id="msgholder-alt"></div>
    <h1>Maintenance</h1>
    <div class="box">
    The site is maintenance. means this site is not avalabile <a href="/admin">Admin ACP</a>
    </div>
<?php include './site.php?footer';?>
 

JordanTBH

New Member
Sep 4, 2010
13
3
Maintenance:
PHP:
<?php include './site.php?header'; ?>
<div id="msgholder-alt"></div>
    <h1>Maintenance</h1>
    <div class="box">
    The site is maintenance. means this site is not avalabile <a href="/admin">Admin ACP</a>
    </div>
<?php include './site.php?footer';?>
PHP:
<?php include 'site.php?header'; ?>
<div id="msgholder-alt"></div>
    <h1>Maintenance</h1>
    <div class="box">
    The site is maintenance. means this site is not avalabile <a href="/admin">Admin ACP</a>
    </div>
<?php include 'site.php?footer';?>
 

Markshall

Русский Стандарт
Contributor
Dec 18, 2010
2,637
2,389
PHP:
<?php include "site.php?header"; ?>
<div id="msgholder-alt"></div>
<h1>Maintenance</h1>
<div class="box">
The site is maintenance. means this site is not avalabile <a href="/admin">Admin ACP</a>
</div>
<?php include "site.php?footer"; ?>

Make sure it's like that, then clear your cache.. see if that helps?
 
Status
Not open for further replies.

Users who are viewing this thread

Top