Skip to content

Instantly share code, notes, and snippets.

@exside
Forked from fomigo/gist:4059751
Created March 2, 2013 21:10
Show Gist options
  • Save exside/5073309 to your computer and use it in GitHub Desktop.
Save exside/5073309 to your computer and use it in GitHub Desktop.
<?php
/*** GetTemplate ***/
include MODX_CORE_PATH . 'custom/templates/' . $modx->resource->template . '.html';
return;
/*** Include ***/
$chunk = $modx->getOption('chunk', $scriptProperties, false);
$snippet = $modx->getOption('snippet', $scriptProperties, false);
if ($chunk) {
include MODX_CORE_PATH . 'custom/chunks/' . $chunk . '.html';
} else if ($snippet) {
return include MODX_CORE_PATH . 'custom/snippets/' . $snippet . '.php';
}
/*** TraceGlobals ***/
$output = '';
$output .= PHP_EOL . '====== GET =========' . PHP_EOL . print_r($_GET, true);
$output .= PHP_EOL . '====== POST ========' . PHP_EOL . print_r($_POST, true);
$output .= PHP_EOL . '====== COOKIE ======' . PHP_EOL . print_r($_COOKIE, true);
$output .= PHP_EOL . '====== SESSION =====' . PHP_EOL . print_r($_SESSION, true);
return $output;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment