首页 技术 正文
技术 2022年11月12日
0 收藏 755 点赞 2,525 浏览 1349 个字

注意! 下不能有空行 上也不能有空行 问题未解决

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script src="jquery.min.js"></script>
<script src="markdown.js"></script>
<link href="http://cdn.bootcss.com/bootstrap/3.3.1/css/bootstrap.min.css" rel="stylesheet">
<style> code {
margin:0;
padding:1em;
background:#F9F9F9;
border:1px dashed #2F6FAB;
display:block;
white-space:pre;
font-family:"Courier New", Courier, monospace;
color:#666;
line-height:1.5;
overflow:auto;
}
</style>
</head>
<body>
<?php
session_start();
if (isset($_GET['mdpsd'])) {
if ($_GET['mdpsd'] != "xienaizhong") {
} else {
$_SESSION['loginmd'] = "1";
}
header("Location:/doc");
}
if ($_SESSION['loginmd'] != "1") {
exit("<form method='get'><input name='mdpsd'><input type='submit' value='提交'></form>");
}?><textarea id="text-input" oninput="this.editor.update()"
rows="6" cols="60" style="display: none;"><?php include $_GET['f'] . ""; ?></textarea>
<div id="preview"></div><script>
function Editor(input, preview) {
this.update = function () {
preview.innerHTML = markdown.toHTML(input.value);
};
input.editor = this;
this.update();
}
var $ = function (id) {
return document.getElementById(id);
};
new Editor($("text-input"), $("preview"));</script><hr>
<?php
$dir = __DIR__;
$file = scandir($dir);
$index = 1;
foreach ($file as $x) {
if (strpos($x, ".md") >= 1) {
echo "<a href='/doc?f=" . $x . "'>" . $x . "</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
if ($index % 4 == 0) {
echo "<br>";
}
$index = $index +1;
}
}
?></body>
</html>
相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,071
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,549
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,397
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,174
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,809
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,889