This repository has been archived on 2025-06-21. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
suitedesk/libraries/geshi/colorize.php

17 lines
547 B
PHP

<?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();