PHP simple markdown app Markup Language

Source: Internet
Author: User

Demo:

<! Doctype html Public "-// W3C // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <HTML xmlns = "http://www.w3.org/1999/xhtml">  Center {width : 960px; margin : 0 Auto; Border : 1px solid #  333; Background-color:#  CCC;  } </Style> <SCRIPT src = "http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" Language = "JavaScript" type = "text/JavaScript"> </SCRIPT> <SCRIPT src = "wkl_ajax.js" Language = "JavaScript" type = "text/JavaScript"> </SCRIPT> <SCRIPT type = "text/JavaScript"> $ (  Function  (){  //  $ ("# Md_test"). Change (Alert ("AAAAA "));  });  Function  Text_onchange (){ /*  _ Ape_json _. Search ("me. php", "com = 13", function (meed) {alert (meed. Just + "12 ...");});  */  //  Alert ("Fuck ");  } </SCRIPT>  Switch  Your markdown scripts to HTML <A href = "http://wowubuntu.com/markdown/" target = "_ blank"> markdown manual </a> <form method = "Post" Action = "MD. PHP "> <textarea id =" md_test "name =" md_test "rows =" 20 "Cols =" 100 "onkeypress =" text_onchange () "> <? PHP  If ( Isset ( $ _ Post ['Md _ Test' ]) {  Echo   $ _ Post ['Md _ Test' ];}  Else  {  Echo " # This is H1 ## this is H2 #### this is h6 " ;} ?> </Textarea> <input type = "Submit" value = "Submit"/> <br> --------------------------------------------------------------------- <? PHP If ( Isset ( $ _ Post ['Md _ Test' ]) {  $ Md_inputs = Str_replace ("\ R", "\ n ", $ _ Post ['Md _ Test' ]);  $ Md_inputs = "Echo '". $ Md_inputs . "'". "| Markdown" ;  $ Md_inputs = @ Shell_exec ($ Md_inputs  );  Echo   $ Md_inputs  ;}  Else  {  $ Str =" Echo '# This is H1 ## this is H2 ##### this is H3' | markdown " ;  Echo @ Shell_exec ( $ Str  );} ?> </Body> 

 

End

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.