gpt4 book ai didi

php - Zendframework——mysql注入(inject)如何防护

转载 作者:行者123 更新时间:2023-11-29 05:42:26 26 4
gpt4 key购买 nike

如果我使用方法,例如在 ZF 中插入、更新我会安全吗(mysql 注入(inject))?

例如部分代码:

            $data = array(
'autor' => $autor,
'title' => $title,
'text' => $text,
'date' => $date,
);
$news = new News();
$news->insert($data); // safe?

最佳答案

这里有类似的问题:

How to prevent SQL Injection attack in applications programmed in Zend Framework?

始终确保使用 mysql_real_escape_string 清理用户输入值

关于php - Zendframework——mysql注入(inject)如何防护,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5693977/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com