Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
互联网应用开发
wiki-php
Wiki
code standard
code standard
· Changes
Page history
Update code standard
authored
Oct 29, 2024
by
互联网应用开发
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletion
+22
-1
code-standard.md
code-standard.md
+22
-1
No files found.
code-standard.md
View page @
6ce66000
...
@@ -180,3 +180,24 @@ class Person {
...
@@ -180,3 +180,24 @@ class Person {
* )
* )
*/
*/
````
````
#### 安全规范
使用强类型(强制数据类型转换)。
避免使用魔术引号(Magic Quotes)。
使用预处理语句(Prepared Statements)进行数据库操作。
使用HTTPS进行敏感数据传输。
使用足够强度的密码散列。
使用防SQL注入和XSS攻击的函数。
限制文件上传类型和大小。
使用防止CSRF攻击的机制。
使用错误和异常处理。
定期更新PHP和第三方库。
\ No newline at end of file