Markdown Syntax Test

Using plugin PHP-Markdown. Just a test! # Header1

Header2

Header3

Header4

Header5
Header6

strong

italic

  • Unordered list 1
  • Unordered list 2
  • Unordered list 3
  1. Ordered List 1
  2. Ordered List 2
  3. Ordered List 3

This is inline code haha.

Markdown 标记区块引用是使用类似 email 中用 > 的引用方式。如果你还熟悉在 email 信件中的引言部分,你就知道怎么在 Markdown 文件中建立一个区块引用,那会看起来像是你自己先断好行,然后在每行的最前面加上 > : Markdown 也允许你偷懒只在整个段落的第一行最前面加上 > : 区块引用可以嵌套(例如:引用内的引用),只要根据层次加上不同数量的 > : This is the first level of quoting.

This is nested blockquote.

Back to the first level.

Code:

<?php
header("Content-type:text/plain");
$conn = new mysqli("localhost", "root", "1234", "wordpress");
$conn->set_charset("utf8");
$result = $conn->query("SELECT post_content, ID FROM wp_posts");
$stmt = $conn->prepare("UPDATE wp_posts SET post_content = ? WHERE ID = ?"); 


$search  = array("&lt;", "&gt;", "&quot;", "&amp;");
$replace = array("<"   , ">"   , """    , "&"    );
while ($row = $result->fetch_array())
{
  $id = $row['ID'];
  $post_content = str_replace($search, $replace, $row['post_content']);
  $stmt->bind_param('si', $post_content, $id);
  if (!$stmt->execute())
  {
    die("n[ERROR!]".$id."n");
  }
  else
  {
    echo "[Success]".$id."n";
  }
}


$result->free();
$conn->close();
?>

Crayon:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
header("Content-type:text/plain");
$conn = new mysqli("localhost", "root", "1234", "wordpress");
$conn->set_charset("utf8");
$result = $conn->query("SELECT post_content, ID FROM wp_posts");
$stmt = $conn->prepare("UPDATE wp_posts SET post_content = ? WHERE ID = ?");


$search  = array("&lt;", "&gt;", "&quot;", "&amp;");
$replace = array("<"   , ">"   , """    , "&"    );
while ($row = $result->fetch_array())
{
  $id = $row['ID'];
  $post_content = str_replace($search, $replace, $row['post_content']);
  $stmt->bind_param('si', $post_content, $id);
  if (!$stmt->execute())
  {
    die("n[ERROR!]".$id."n");
  }
  else
  {
    echo "[Success]".$id."n";
  }
}


$result->free();
$conn->close();
?>

Comments