typecho前端模板如何直接输出markdown原格式,不渲染成html

可不可以在前台直接输出markdown原格式?

阅读 3.1k
1 个回答

可以直接

$db = Typecho_Db::get();
                $sql = $db->select()->from('table.contents')
                ->where('cid = ?', $cid(文章cid))
                ->where('type = ?', 'post')
                ->limit(1);
                $res = $db->fetchAll($sql);
                echo res[0]['text'];
推荐问题