What security issues should I look out for in PHP

2019-01-06 12:07发布

I just starting out learning PHP, I've been developing web apps in ASP.Net for a long time. I was wondering if there are any PHP specific security mistakes that I should be looking out for.

So, my question is what are the top security tips that every PHP developer should know?

Please keep it to one tip per answer so people can vote up/down effectively.

标签: php security
18条回答
时光不老,我们不散
2楼-- · 2019-01-06 12:40

Always use POST and not GET for important Data...

查看更多
ゆ 、 Hurt°
3楼-- · 2019-01-06 12:42

Avoid using register_globals.

Warning: This feature has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0.

查看更多
欢心
4楼-- · 2019-01-06 12:43
查看更多
霸刀☆藐视天下
5楼-- · 2019-01-06 12:43

OWASP provides a lot of insight into security issues that are the biggest problems in applications today. It is nice to see that they have a PHP dedicated page available

http://www.owasp.org/index.php/PHP_Top_5

查看更多
放我归山
6楼-- · 2019-01-06 12:47

don't use "Register Global Variables" and filter user input for xss and injections

查看更多
等我变得足够好
7楼-- · 2019-01-06 12:48
登录 后发表回答