avenger_msoft
Новичок
Вопрос по Smarty + NOTICE
Привет всем!
Есть код:
1.php
и
2.php
и
1.tpl
Почему в данном коде не отображается ошибка? И в логи она тоже не пишется?
С уважение, Иван.
Привет всем!
Есть код:
1.php
PHP:
<?php
error_reporting(E_ALL); // report all errors
define('SMARTY_DIR', "./../includes/engine/Smarty/");
require_once(SMARTY_DIR . "Smarty.class.php");
class MySmarty extends Smarty {
function MySmarty() {
$this->Smarty();
$this->compile_dir = './temp';
$this->template_dir = './';
$this->register_function('include_module', 'smarty_function_include_module');
}
}
function smarty_function_include_module($params, &$smarty) {
global $db, $modules;
require ('2.php');
return $bb;
}
$smarty = & new MySmarty();
$smarty->display('1.tpl');
?>
2.php
PHP:
<?php
echo $ttttt; // здесь должен быть NOTICE
$bb = 'Привет!';
?>
1.tpl
PHP:
<html>
{include_module module="name"}
</html>
Почему в данном коде не отображается ошибка? И в логи она тоже не пишется?
С уважение, Иван.