Add example file.
This commit is contained in:
23
example/site/blog.html.php
Normal file
23
example/site/blog.html.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
$title = "Blog";
|
||||
include("templates/header.html.php");
|
||||
?>
|
||||
|
||||
<p>
|
||||
Welcome to my blog page! Here's a list of my current entries:
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<?php
|
||||
foreach(glob("site/blog/*.cfg.php") as $i)
|
||||
{
|
||||
include($i);
|
||||
$entry_file = substr($i, 4, -8) . '.html';
|
||||
echo "<li><a href='$entry_file'>$blog_date - $blog_title</a></li>";
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
|
||||
<?php
|
||||
include("templates/footer.html.php");
|
||||
?>
|
4
example/site/blog/000-first.cfg.php
Normal file
4
example/site/blog/000-first.cfg.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
$blog_title = "My First Post";
|
||||
$blog_date = "2022-11-07";
|
||||
?>
|
9
example/site/blog/000-first.html.php
Normal file
9
example/site/blog/000-first.html.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
include("site/blog/000-first.cfg.php");
|
||||
$title = $blog_title;
|
||||
include("templates/header.html.php");
|
||||
?>
|
||||
<p>My first blog post.</p>
|
||||
<?php
|
||||
include("templates/footer.html.php");
|
||||
?>
|
10
example/site/index.html.php
Normal file
10
example/site/index.html.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
$title = "Home";
|
||||
include("templates/header.html.php");
|
||||
?>
|
||||
<p>
|
||||
Hello, World! This is an example page.
|
||||
</p>
|
||||
<?php
|
||||
include("templates/footer.html.php");
|
||||
?>
|
1
example/site/static-file.txt
Normal file
1
example/site/static-file.txt
Normal file
@@ -0,0 +1 @@
|
||||
A test file.
|
Reference in New Issue
Block a user