本文整理匯總了PHP中GeSHi::set_use_language_tab_width方法的典型用法代碼示例。如果您正苦於以下問題:PHP GeSHi::set_use_language_tab_width方法的具體用法?PHP GeSHi::set_use_language_tab_width怎麽用?PHP GeSHi::set_use_language_tab_width使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類GeSHi
的用法示例。
在下文中一共展示了GeSHi::set_use_language_tab_width方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1:
$geshi->set_header_type(GESHI_HEADER_PRE_TABLE);
//$geshi->set_header_type(GESHI_HEADER_NONE);
//===
// Select the line number method
if ($lineNumbers == "true") {
$geshi->enable_line_numbers(GESHI_NORMAL_LINE_NUMBERS);
//$geshi->enable_line_numbers(GESHI_FANCY_LINE_NUMBERS, 5);
} else {
$geshi->enable_line_numbers(GESHI_NO_LINE_NUMBERS);
}
//===
// Set where to start counting line numbers from
$geshi->start_line_numbers_at((int) $startLine);
//===
// Set the tab processing (only used for non-pre header types)
$geshi->set_use_language_tab_width(true);
$geshi->set_tab_width(4);
//===
// Set the base styles
initGeshiStyles($geshi);
//===
// Set the header and footer
// Note: As of this moment the footer doesn't seem to work right with the table
// output format so we are leaving it empty.
$geshi->set_header_content($codeHeader);
$geshi->set_footer_content('');
//===
// Process the code
$highlightedCode = $geshi->parse_code();
//===
// Note: The old InsertCode plugin did some extra adjustments to the output string