Réf. : [SMARTY] how to make debug through url?
| From: | philippe dot morange at ca-indosuez dot com | Date: | Fri, 21 Mar 2003 13:07:25 +0000 |
| Subject: | Réf. : [SMARTY] how to make debug through url? | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-8807@lists.php.net to get a copy of this message | ||
> Is it possible to trigger debug on through url like
> www.myhome.com/page.php?debug=on
Yes, simply do this:
if ($debug == 'on') {
$smarty->debugging = true;
}
or you could do:
if (!isset($debug) {
$debug = false;
}
$smarty->debugging = $debug;
Where debug is either equal to true or false or not set (false).
I also read in the doc about putting SMARTY_DEBUG in the URL after enabling this optoin with
$debugging_ctrl in the Smarty config file... But I can't say more.