Initial Commit
Add the basic structure of the site.
This commit is contained in:
13
common/markdown.php
Normal file
13
common/markdown.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
#Markdown display code
|
||||
require ($_SERVER['DOCUMENT_ROOT'].'/common/vendor/autoload.php');
|
||||
function get_markdown($markdown_source){
|
||||
#Markdown parseing code.
|
||||
$MD_Parser = new Parsedown();
|
||||
$MD_Path = $markdown_source;
|
||||
$MD_File = fopen($MD_Path, "r") or die("File not found.");
|
||||
$MD_Text = fread($MD_File, filesize($MD_Path));
|
||||
echo $MD_Parser->text($MD_Text);
|
||||
fclose($MD_File);
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user