Markdown is a markup language that can be written using an ordinary text editor, which can have a certain format for normal text content with simple markup syntax.
Markdown has a series of derivative versions that extend the functionality of markdown (such as tables, footnotes, embedded HTML, and so on) that the original markdown does not yet have, allowing Markdown to be converted into more formats, such as Latex,docbook. Markdown enhanced version of the more famous have markdown Extra, Multimarkdown, Maruku and so on. These derivative versions are either based on tools such as Pandoc, or based on web sites, such as GitHub and Wikipedia, which are syntactically basic compatible, but have some changes in syntax and rendering effects.
Such a beautiful markup language how do we support her, below we describe how to support markdown under the Apache server.
Parsedown is a PHP markdown parser, which 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, Apache needs to be configured to support PHP and then download Parsedown.
Configuration Increase in httpd.conf
Action markdown/markdown/handler.php
AddHandler Markdown. MD
Increase in handler.php
Require (' parsedown/parsedown.php ');
$file = Realpath ($_server[' path_translated ');
$Parsedown = new Parsedown ();
echo $Parsedown->text (file_get_contents ($file));
Others can be displayed according to their needs by adding some style styles.
The above describes the Apache configuration support markdown format, including aspects of the content, I hope that the PHP tutorial interested in a friend helpful.