diff options
author | Aaron Ball <nullspoon@oper.io> | 2019-09-28 17:46:55 -0600 |
---|---|---|
committer | Aaron Ball <nullspoon@oper.io> | 2019-09-28 17:46:55 -0600 |
commit | bfcad999061f3abcba8d2d95d412d140ca73b9a7 (patch) | |
tree | 0df61748e22da14aee020a41664d9409b1ff45db | |
parent | d55480b8a1c265a4098a8b8fa714f28499f68cb6 (diff) | |
download | oper.io-bfcad999061f3abcba8d2d95d412d140ca73b9a7.tar.gz oper.io-bfcad999061f3abcba8d2d95d412d140ca73b9a7.tar.xz |
index:remove header reading
This wasn't very scalable. Now the Makefile adds header1 to the output
html to avoid this problem.
-rwxr-xr-x | index.php | 7 |
1 files changed, 0 insertions, 7 deletions
@@ -23,13 +23,6 @@ if($post[0] == '.' || $post[0] == '/') { // Prevent access to any pages starting with '.' or '/' print("<p>Error: the page you have requested does not exist.</p>"); } elseif(file_exists('html/' . $post . '.html')) { - // Get the first line - $f = fopen('posts/' . $post . '.adoc', 'r'); - $firstline = fgets($f); - fclose($f); - // Print the first line (title) - print('<h1>' . $firstline . '</h1>'); - // Get and print post body print(file_get_contents('html/' . $post . '.html')); } else { |