Referencing an external text file for content

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
bbuttry
Forum Newbie
Posts: 2
Joined: Tue May 31, 2005 2:49 pm

Referencing an external text file for content

Post by bbuttry »

Is there a way to create an area of an HTML page that calls an external text file?

This way, where ever the text is throughout the site, it could be changed in one simple text file and then it automatically be updated on every HTML page where it is referenced without having to physically change every HTML document.

Can someone give a newbie some direction?

Thanks in advance.
User avatar
Skara
Forum Regular
Posts: 703
Joined: Sat Mar 12, 2005 7:13 pm
Location: US

Post by Skara »

Code: Select all

print(file_get_contents('file.txt'));
Post Reply