>>405
本じゃないけど、大垣たんの連載全部読めば?

連載:なぜPHPアプリにセキュリティホールが多いのか?|gihyo.jp … 技術評論社
http://gihyo.jp/dev/serial/01/php-security