PHP 輸入字串轉換 - htmlspecialchars



htmlspecialchars ( string $string [, int $quote_style = ENT_COMPAT [, string $charset [, bool $double_encode = true ]]] )



.'&' (ampersand) becomes '&'
.'"' (double quote) becomes '"' when ENT_NOQUOTES is not set.
.''' (single quote) becomes ''' only when ENT_QUOTES is set.
.'<' (less than) becomes '<'
.'>' (greater than) becomes '>'








資料來源:http://php.net/manual/en/function.htmlspecialchars.php

0 Comment:

張貼留言