Пример #1
0
<?php

if (isset($_POST['execute'])) {
    unlink('executables/test.php');
    file_put_contents('executables/test.php', html_entity_decode($_POST['incoming_data']));
    $execution_out = execution_results('executables/test.php', true);
    if (isset($_POST['raw']) && $_POST['raw'] == 'true') {
        highlight_string($execution_out);
        //highlighted raw output
    } else {
        print $execution_out;
        //formatted html output
    }
    exit;
}
$mvc->data = htmlentities(file_get_contents('executables/test.php'));
$mvc->renderView('main');
Пример #2
0
 private function generateContent($view_name)
 {
     return execution_results($view_name);
 }