I am trying to use the "INCLUDE" statement to import a html file into one of my other html files. The php file loads the first html file, and then in the php I have an INCLUDE statement to append an outside html into the first html file.
This is what I have in the php file:
include('' . $year . '.htm');
It is importing the outside html file sucessfully HOWEVER its importing it at the TOP of the page rather than the BOTTOM. I need the outside html page to append to the BOTTOM of the first..
How do I do this??
How do I force include page to import at the BOTTOM of page?
Moderator: General Moderators
-
camarosource
- Forum Commoner
- Posts: 77
- Joined: Sat Aug 03, 2002 10:43 pm
You could do:
and the CSS for id="bottom":
Code: Select all
<div id="bottom" align="center">
<?php include('bottomPage.php'); ?>
</div>Code: Select all
/* CSS Document */
#bottom {
position:absolute;
bottom:0%;
}- no_memories
- Forum Contributor
- Posts: 145
- Joined: Sun Feb 01, 2004 7:12 pm
- Location: New York City
This is one way; look for <?php require("loadtime.php"); ?>. Just make sure your link points to the external php file. In all actuality, the PhP should be completely outside the markup, but that's a bit beyond the scope of this question.
now, the <?php require("loadtime.php"); ?> is linked to this code; an external php file:
The same can be done with pieces of markup as well, splitting up the header, content, and footer, then calling them in dynamically using php.
Code: Select all
<div id="f">
<span><a href="http://validator.w3.org/check/referer" title="Validated xHTML 1.1">xHTML 1.1</a></span>
| <span><a href="http://jigsaw.w3.org/css-validator/check/referer" title="Validated CSS 2">CSS 2</a></span>
| <span><a href="/" title="Bobby AAA/508 Approved">AAA/508</a></span>
| <span class="green"><?php require("loadtime.php"); ?></span>
| <span class="crimson">Optimized for 800x600</span>
</div>Code: Select all
<?php
function getmicrotime(){
list($usec, $sec) = explode(" ",microtime());
return ((float)$usec + (float)$sec);
}
$time_start = getmicrotime();
for ($i=0; $i <1000; $i++){
}
$time_end = getmicrotime();
$time = $time_end - $time_start;
$time = round($time,6);
echo "Load Time: $time sec."; //you can edit the "Load Time:"
?>- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
- johnperkins21
- Forum Contributor
- Posts: 140
- Joined: Mon Oct 27, 2003 4:57 pm
These seem to be overly complex ideas.
If you just want it at the bottom of a simple page:
Alternatively you could us frames or an iframe element. Heck, even a table would work. Just think of the include as copying and pasting your file into the parent file and structure your page that way.
If you just want it at the bottom of a simple page:
Code: Select all
<html>
<head></head>
<body>
HTML stuff
more HTML stuff
<?
include "yourfile";
?>
</body>
</html>