diff --git a/index.php b/index.php
index 07aa690..dd75fba 100644
--- a/index.php
+++ b/index.php
@@ -101,8 +101,11 @@ else if (isset($_POST['action']))
if (substr($file,0,1)==":")
specialurl($file,true);
else
- print(getcontent($file,true,true));
+ {
+ $md=strpos('.md',$file)>=0;
+ print(getcontent($file,$md,true));
exit;
+ }
case 'realopen':
$file=urldecode($_POST['file']);
print(getcontent($file,false,true));
@@ -139,8 +142,9 @@ else if ($filedetail['extension']!="" && strpos(ALLOWED_EXT, $filedetail['extens
{
if (file_exists(CONTENT_DIR . $file))
{
- if ($filedetail['extension']=="css") header("Content-type: text/css");
- print file_get_contents(CONTENT_DIR . $file);
+ header('Content-type: '.mime_content_type(CONTENT_DIR . $file),true);
+ print file_get_contents(CONTENT_DIR . $file, false);
+ exit;
}
else
{
@@ -157,7 +161,7 @@ else
-
+
@@ -169,6 +173,7 @@ else
':''); ?>
+