Skip to content

Instantly share code, notes, and snippets.

@ahmeturganci
Created January 18, 2018 13:05
Show Gist options
  • Save ahmeturganci/d3e49e0fb07845b9f82c2a8bf0e3c7cb to your computer and use it in GitHub Desktop.
Save ahmeturganci/d3e49e0fb07845b9f82c2a8bf0e3c7cb to your computer and use it in GitHub Desktop.
<?php
include 'Parsedown.php';
?>
<html>
<head>
<title>Reading a file using PHP</title>
<meta charset="UTF-8">
</head>
<style type="text/css">
html,
body {
font-family: 'Segoe UI', Tahoma, Helvetica, sans-serif;
height: 100%;
}
</style>
<body>
<?php
$Parsedown = new Parsedown();
$filename = "RELEASENOTE.md";
$file = fopen( $filename, "r" );
$filesize = filesize( $filename );
$filetext = fread( $file, $filesize);
fclose( $file );
echo $Parsedown->text($filetext);
?>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment