15,067
edits
m (→使用者操作/使用者輸入的內容) |
|||
| Line 11: | Line 11: | ||
使用者輸入內容,內容可能是 | 使用者輸入內容,內容可能是 | ||
* 空值 ex: 空白、全形空白、NULL、0000-00-00 | * 空值 ex: 空白、全形空白、NULL、0000-00-00 | ||
* 夾雜空白 | |||
* 包含特殊符號 ex: 單引號 ', 雙引號 ", > < <== 對策: [http://www.php.net/manual/en/function.htmlentities.php PHP: htmlentities - Manual] | * 包含特殊符號 ex: 單引號 ', 雙引號 ", > < <== 對策: [http://www.php.net/manual/en/function.htmlentities.php PHP: htmlentities - Manual] | ||
* 內容的前後有空白 <== 對策: [http://php.net/manual/en/function.trim.php PHP: trim] 或 jQuery [http://api.jquery.com/jQuery.trim/ $.trim('string')] | * 內容的前後有空白 <== 對策: [http://php.net/manual/en/function.trim.php PHP: trim] 或 jQuery [http://api.jquery.com/jQuery.trim/ $.trim('string')] | ||