国产chinesehdxxxx野外,国产av无码专区亚洲av琪琪,播放男人添女人下边视频,成人国产精品一区二区免费看,chinese丰满人妻videos

CodeIgniter 排版輔助函數(shù)

2018-07-21 15:44 更新

排版輔助函數(shù)

排版輔助函數(shù)文件包含了文本排版相關(guān)的一些函數(shù)。

加載輔助函數(shù)

該輔助函數(shù)通過下面的代碼加載:

$this->load->helper('typography');

可用函數(shù)

該輔助函數(shù)有下列可用函數(shù):

auto_typography($str[, $reduce_linebreaks = FALSE])

參數(shù):

  • $str (string) -- Input string
  • $reduce_linebreaks (bool) -- Whether to reduce multiple instances of double newlines to two

返回: HTML-formatted typography-safe string

返回類型: string

格式化文本以便糾正語義和印刷錯誤的 HTML 代碼。

這個函數(shù)是 CI_Typography::auto_typography 函數(shù)的別名。 更多信息,查看 排版類 。

Usage example:

$string = auto_typography($string);

注解

格式排版可能會消耗大量處理器資源,特別是在排版大量內(nèi)容時。 如果你選擇使用這個函數(shù)的話,你可以考慮使用 緩存 。

nl2br_except_pre($str)

參數(shù):

  • $str (string) -- Input string

返回: String with HTML-formatted line breaks

返回類型: string

將換行符轉(zhuǎn)換為 標簽,忽略 標簽中的換行符。除了對 標簽中的換行處理有所不同之外,這個函數(shù)和 PHP 函數(shù) nl2br() 是完全一樣的。

使用示例:

$string = nl2br_except_pre($string);

entity_decode($str, $charset = NULL)

參數(shù):

  • $str (string) -- Input string
  • $charset (string) -- Character set

返回: String with decoded HTML entities

返回類型: string

這個函數(shù)是 CI_Security::entity_decode() 函數(shù)的別名。 更多信息,查看 安全類 。

以上內(nèi)容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號