Jump to content

[SOLVED] how can i make this <?php include..?> file more effective??


arthemiogod

Recommended Posts

this is the code i am using to include my header. the issue is that the embeded swf, the first one, will not show on IE. this is giving me a headache because it will show even if i write a dot (.) right after or before the <?php require_once..?>, which is crazy. will also show if i add any other kind of code like <!--<?php header("Cache-control: private");?>-->, yes, and an error message with it. i checked for extras space and there is none. i just don't know what to do to it to make it work. my head is spinning here.

 

Arthemio  :-\

 

<?php require_once('_php/browser.php');?><!--<?php header("Cache-control: private");?>-->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

 

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

<meta http-equiv="Content-Language" content="en-us"/>

 

<title><?=$page_title;?></title>

 

<meta name="ROBOTS" content="ALL"/>

<meta http-equiv="imagetoolbar" content="no"/>

<meta name="MSSmartTagsPreventParsing" content="true"/>

<meta name="Copyright" content="© 2006 Real Estate Arts"/>

<!-- © Copyright 2006 by Real Estate Arts All Rights Reserved. -->

<!--          Design & Code by Yann Bettremieux              -->

 

<meta name="Keywords" content="<?= $page_keywords;?>"/>

<meta name="Description" content="<?= $page_description;?>"/>

 

<link href="_css/content.css" rel="stylesheet" type="text/css" media="all" />

<object width="769" height="184">

<param name="movie" value="nav_feature.swf">

<embed src="_flash/nav_feature.swf" width="769" height="184">

</embed>

</object>

 

<script type="text/javascript" src="./_js/ufo.js"></script>

<script type="text/javascript">

var FO = { movie:"_flash/feature.swf", width:"459", height:"220", majorversion:"6", build:"0" };

UFO.create(FO, "feature");

</script>

 

<?php css_add();?>

 

</head>

<body class="<?=$page_class;?>">

 

<div id="wrap">

<div id="inner_wrap">

<?php

//post this at top of page before anything else

$page = $_GET['page'];

//post this in a table

if ($page == NULL){

include 'pages/home.php';

}

elseif (file_exists('pages/' . $page . '.php')) {

include 'pages/' . $page . '.php';

}

elseif ($page == logout){

session_destroy();

}

elseif ($page == notloggedin){

echo 'You Are Not logged in! Too Bad';

}

else include 'pages/error.php';

?>

 

To See An Example Of This Scrpt In Use Visit My Webserver At http://24.76.180.18

did you know "header" function need to be call prior to any data should send to browser.

 

<?php require_once('_php/browser.php');?><!--<?php header("Cache-control: private");?>-->

 

I can see very clearly that '<!--" will be sent before the header called.

thank you for the reply. i got it working a bit different though. in included the embed swf in a javascrip code and it works. look at what i did:

note: and do let me know if you have any comments on how i went about it. by the way, this took me 6 day to figure out.  ::)

 

<meta name="Keywords" content="<?= $page_keywords;?>"/>

<meta name="Description" content="<?= $page_description;?>"/>

 

 

 

<link href="_css/content.css" rel="stylesheet" type="text/css" media="all" />

<script type="text/javascript" src="./_js/swfobject.js"></script>

<div id="flashContent">You need to download the latest version of flash player</div>

 

<script type="text/javascript">

  var so = new SWFObject("_flash/nav_feature.swf", "header", "769", "184", "8", "#ffffff");

    so.write("flashContent");

</script>

<!-- > <object width="769" height="184">

<param name="movie" value="nav_feature.swf">

<embed src="_flash/nav_feature.swf" width="769" height="184">

</embed>

</object>

-->

It looks good! I know just how annoying it can be to spend a week scripting something and never beingable to figure out the problem! I Am having that same thing happen to me now! A script that is probably only one varable is causeing me a great deal of stress! lolz been trying to figure it out for the last 2 days!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.