Files
smarty/docs/en/programmers/api-variables/variable-debugging-ctrl.xml
2006-09-27 06:28:21 +00:00

54 lines
1.6 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="variable.debugging.ctrl">
<title>$debugging_ctrl</title>
<para>
This allows alternate ways to enable debugging. <literal>NONE</literal>
means no alternate methods are allowed. <literal>URL</literal>
means when the keyword <literal>SMARTY_DEBUG</literal> is found in the
<literal>QUERY_STRING</literal>, debugging is enabled for that
invocation of the script. If <link linkend="variable.debugging">
<parameter>$debugging</parameter></link> is &true;, this value is ignored.
</para>
<example>
<title>$debugging_ctrl on localhost</title>
<programlisting role="php">
<![CDATA[
<?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';
?>
]]>
</programlisting>
</example>
<para>
See also <link linkend="chapter.debugging.console">debugging console</link>
section and
<link linkend="variable.debugging"><parameter>$debugging</parameter></link>.
</para>
</sect1>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->