Markdown is a markup language that can be written using an ordinary text editor. Through simple markup syntax, it can make ordinary text content have a certain format.
Markdown has a series of derivative versions that are used to extend the functions of Markdown (such as tables, footnotes, embedded HTML, etc.). These functions are not yet available in the original Markdown. They can convert Markdown into more formats, such as LaTeX , Docbook. The more famous Markdown enhanced versions include Markdown Extra, MultiMarkdown, Maruku, etc. These derivative versions are either based on tools, such as Pandoc; or based on websites, such as GitHub and Wikipedia. They are basically compatible in syntax, but have changes in some syntax and rendering effects.
How can we support such an awesome markup language? Let’s introduce how to support markdown under the Apache server.
Parsedown is a PHP Markdown parser that is very fast and concise.
Plugin homepage:
http://parsedown.org/
Parsedown syntax is very simple.
$Parsedown=new Parsedown();
echo $Parsedown->text( 'Hello
_Parsedown_!');#
prints: Hello Parsedown!
Home page, Apache needs to be configured to support PHP, and then download parsedown.
Configuration added in httpd.conf
Action markdown /markdown/handler.php
AddHandler markdown .md
Added
in handler.php require('parsedown/ Parsedown.php ');
$ File = RealPath ($ _ Server [' PATH_TRANSLED ']); ET_CONTENTS ($ File);
Others can add some style display according to their own needs. The above introduces the Apache configuration to support markdown format, including aspects of the content. I hope it will be helpful to friends who are interested in PHP tutorials.