compile_check = true; $smarty->debugging = false; $smarty->force_compile = true; $smarty->template_dir = "./templates"; $smarty->compile_dir = "./templates_c"; $smarty->config_dir = "./configs"; function Check( $support, $description, $error_message ) { $result = $description . " "; $ok = false; switch( $support ) { case 'php-gettext': if( function_exists( 'gettext') ) $ok = true; break; case 'php-gd': if( function_exists( 'gd_info') ) $ok = true; break; case 'pear-db': if ( class_exists('DB') ) $ok = true; break; case 'smarty-cache': if ( is_writable( "./templates_c" ) ) $ok = true; break; } if( $ok ) $result .= "  "; else $result .= "$error_message "; echo $result; } $smarty->display('test.tpl'); ?>