Basic About/Contact/Privacy etc. page generator

Status
Not open for further replies.

a.titus1

New member
Jun 24, 2006
567
4
0
Quick bit of code I wrote to easily generate whatever kind of misc. page you might need to include on a landing site/regular site.

Made it as basic as possible so no one should have any trouble. The two php files are show.php and show_c.inc.php. show.php is the output, show_c.inc.php sets up the content. The page content is stored in flat file format in a folder called page_content. That folder has to contain whatever content you want to display for a page. Easiest way to explain would be an example.

For an about page:
1. Place about.txt in the page_content folder.
2. go to the url show.php?page=about *the parameter MUST match the file

Thats it. The show.php file is very simple since I assume everyone is going to want to "skin" it to match their existing template. I figured there's probably a few people will find this useful as well, so enjoy.
 

Attachments

  • Like
Reactions: aeiouy


You may want to filter your data or have a list of valid pages in an array, and then verify the file name is in the array, as I believe there are some ways to pass commands via the way you using.
 
Status
Not open for further replies.