14,959
edits
| Line 9: | Line 9: | ||
** PHP: 可用 [http://php.net/manual/en/function.trim.php rim] 函數處理。陣列元素值則搭配 [http://php.net/manual/en/function.array-map.php array_map] 函數處理。ex: {{kbd | key = <nowiki>$trimmed_array = array_map('trim' ,$array);</nowiki>}}<ref>[http://stackoverflow.com/questions/5762439/how-to-trim-white-spaces-of-array-values-in-php How to trim white spaces of array values in php - Stack Overflow]</ref> | ** PHP: 可用 [http://php.net/manual/en/function.trim.php rim] 函數處理。陣列元素值則搭配 [http://php.net/manual/en/function.array-map.php array_map] 函數處理。ex: {{kbd | key = <nowiki>$trimmed_array = array_map('trim' ,$array);</nowiki>}}<ref>[http://stackoverflow.com/questions/5762439/how-to-trim-white-spaces-of-array-values-in-php How to trim white spaces of array values in php - Stack Overflow]</ref> | ||
** jQuery: [http://api.jquery.com/jQuery.trim/ $.trim('string')] | ** jQuery: [http://api.jquery.com/jQuery.trim/ $.trim('string')] | ||
* 包含特殊符號 ex: 單引號 ', 雙引號 ", 反斜線 \, 大於小於符號 > < <== 對策: [http://www.php.net/manual/en/function.htmlentities.php PHP: htmlentities - Manual] {{kbd | key=<nowiki>echo htmlentities($str, ENT_QUOTES, "UTF-8");</nowiki>}} | * 包含特殊符號 ex: 單引號 ', 雙引號 ", 反斜線 \, 大於小於符號 > < <== | ||
** 對策: [http://www.php.net/manual/en/function.htmlentities.php PHP: htmlentities - Manual] {{kbd | key=<nowiki>echo htmlentities($str, ENT_QUOTES, "UTF-8");</nowiki>}} | |||
** [[Export MySQL query to Excel file]]: [https://errerrors.blogspot.tw/2016/02/navicat.html 解決 Navicat 「存放裝置空間不足,無法完成此操作」問題訊息] 「如果欄位內容是以等號 (=) 、加號 (+)、減號 (-) 或 @ 符號開頭,都會被 (Excel) 視作公式。」而造成錯誤 | |||
* 超出預期的內容長度、內容長度超出預期的版面長度、超出預期的資料數量 | * 超出預期的內容長度、內容長度超出預期的版面長度、超出預期的資料數量 | ||
* 資料數量從少量變成多量時 | * 資料數量從少量變成多量時 | ||