PHP 去除HTML和PHP標籤 - strip_tags
去除字串中的HTML和PHP標籤
張貼者:
小Ko
/ 2012年7月5日 星期四
標籤:
PHP,
PHP Function
/
Comments: ( 0 )
PHP 字串取代 - str_replace
str_replace ( 要被取代的字串 , 拿來代換的字串 , 被搜尋的字串 )
如 str_replace("BB", "DD", "AA BB CC");
結果為 AA DD CC
如 str_replace("BB", "DD", "AA BB CC");
結果為 AA DD CC
張貼者:
小Ko
/ 2010年5月14日 星期五
標籤:
PHP,
PHP Function
/
Comments: ( 0 )
PHP - addslashes stripslashes
addslashes() 對特殊字元增加的反斜線
如:addslashes("O'reilly")
取得值為 O\'reilly
stripslashes() 去除由 addslashes() 增加的反斜線
如: stripslashes ("O\'reilly")
取得值為 O'reilly
如:addslashes("O'reilly")
取得值為 O\'reilly
stripslashes() 去除由 addslashes() 增加的反斜線
如: stripslashes ("O\'reilly")
取得值為 O'reilly
張貼者:
小Ko
/ 2009年12月30日 星期三
標籤:
PHP,
PHP Function
/
Comments: ( 0 )
PHP 輸入字串轉換 - htmlspecialchars
htmlspecialchars ( string $string [, int $quote_style = ENT_COMPAT [, string $charset [, bool $double_encode = true ]]] )
張貼者:
小Ko
標籤:
PHP,
PHP Function
/
Comments: ( 0 )
PHP 擷取中文字
只要PHP.INI檔裡有使用mbstring的擴充功能,便可使用mb_substr()的函式
張貼者:
小Ko
/ 2009年11月12日 星期四
標籤:
PHP,
PHP Function
/
Comments: ( 0 )