Editing content on multiple pages

TodoRojo

New Member
Hey everybody, I'm new to the forum and one of the main reasons why is because I find myself wondering how I can do something and never finding a great answer!

I searched around and wasn't able to find what I'm looking for (if it's on here, forgive me! just link it please!)

Basically on my site I have an "About the Author" part of the page and instead of having to change every page every time I update it, I'd like to be able to use PHP and link it to a text file that I can edit whenever I want to edit (or something to that effect). Any help or hints or places to look would be great! Thank you!
 

TodoRojo

New Member
Found something quite simple to use!

<?php
$about = file_get_contents('nameoffile.txt');
echo $about;
?>
 

Roddy

New Member
"Included" in the web design software that I use is an "Includes" function for local files. This a separate folder containing all the files that you would want to include in more than one page such as the header content, navigation, footer stuff etc, javascripts and so on.

The "master" copy can be updated and then the pages are updated by using the "Update Includes" function in the Insert menu.

You may also want to look at the W3.org site and read about the iframe "seamless" attribute.
 

Nullified

New Member
Here ya go (Very Basic)

index.php:
PHP:
<?php
define('THIS_SCRIPT', 'home');
require_once('includes/global.php');
include('header.html');
?>
<div id="body">My Main Content Goes Here</div>
<?php include('footer.html'); ?>

header.html:
HTML:
<html>
<head>
<title></title>
</head>
<body>
<div id="header">My Header Goes Here</div>

footer.html:
HTML:
<div id="footer">My Footer Goes Here</div>
</body>
</html>
 

JoshuaReen

New Member
Found something quite simple to use!

<?php
$about = file_get_contents('nameoffile.txt');
echo $about;
?>

I agree with you. This is quite simple and easy to use for this purpose. Thanks for sharing it, today I have learned something new here. :)
 
Top