New 'libraries' folder in root instalation directory
This commit is contained in:
parent
05b6a91b0c
commit
006992b900
2267 changed files with 50 additions and 65 deletions
17
libraries/geshi/colorize.php
Normal file
17
libraries/geshi/colorize.php
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
if (function_exists('stream_resolve_include_path') && stream_resolve_include_path('geshi.php') === FALSE) {
|
||||
die('<pre class="html">Please install the GeSHi library. Refer to plugins/codesnippetgeshi/README.md for more information.</pre>');
|
||||
}
|
||||
|
||||
include_once 'geshi.php';
|
||||
|
||||
$json_string = file_get_contents('php://input');
|
||||
$json_object = json_decode($json_string);
|
||||
/*
|
||||
file_put_contents('/tmp/colorize.txt', print_r($json_object, TRUE), FILE_APPEND);
|
||||
*/
|
||||
$geshi = new GeSHi($json_object->html, $json_object->lang);
|
||||
|
||||
echo $geshi->parse_code();
|
||||
|
Reference in a new issue