PHP Classes

File: htdocs/xoops_lib/vendor/smarty/smarty/docs/programmers/api-variables/variable-debugging-ctrl.md

Recommend this page to a friend!
  Packages of Michael Beck   Xoops 2.5   htdocs/xoops_lib/vendor/smarty/smarty/docs/programmers/api-variables/variable-debugging-ctrl.md   Download  
File: htdocs/xoops_lib/vendor/smarty/smarty/docs/programmers/api-variables/variable-debugging-ctrl.md
Role: Example script
Content type: text/markdown
Description: Example script
Class: Xoops 2.5
Modular content management publication system
Author: By
Last change:
Date: 2 months ago
Size: 777 bytes
 

Contents

Class file image Download

\$debugging\_ctrl {#variable.debugging.ctrl}

This allows alternate ways to enable debugging. NONE means no alternate methods are allowed. URL means when the keyword SMARTY_DEBUG is found in the QUERY_STRING, debugging is enabled for that invocation of the script. If $debugging is TRUE, this value is ignored.

<?php
// shows debug console only on localhost ie
// http://localhost/script.php?foo=bar&SMARTY_DEBUG
$smarty->debugging = false; // the default
$smarty->debugging_ctrl = ($_SERVER['SERVER_NAME'] == 'localhost') ? 'URL' : 'NONE';
?>

See also debugging console section, $debugging and $smarty_debug_id.