File: variable-debugging-ctrl.md

package info (click to toggle)
smarty4 4.5.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,136 kB
  • sloc: php: 18,847; yacc: 986; makefile: 48; sh: 12
file content (20 lines) | stat: -rw-r--r-- 777 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
\$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`](#variable.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](#chapter.debugging.console) section,
[`$debugging`](#variable.debugging) and
[`$smarty_debug_id`](#variable.smarty.debug.id).