gpt4 book ai didi

PHP 5.3 magick 引用 gpc

转载 作者:行者123 更新时间:2023-11-30 23:31:04 25 4
gpt4 key购买 nike

我有一个问题,一个带有 mysql 查询的旧程序在禁用 magick_quotes_gpc 的新 php 5.3 中不起作用,当查询变量具有单引号时,例如:

$text=$_GET['text'] --> "This is a text doesn'**strong text**t works"
mysql_query("UPDATE table SET '{$text}'");

只有在我之前做这个时才有效:

$text=mysql_real_escape_string($_GET['text']);

但是我不能修改程序,而且程序又大又查询量大,怎么办?

最佳答案

But I can't modify the program, and the program is to big and have a lot of querys, which I can i do?

如果你不能修改程序,那么你应该启用magic_quotes_gpc - 该功能本身在 php 5.3 中仍然可用 - 只是弃用了。

然而,升级到 php 5.4 并运行应用程序将是一个安全问题。因此,在您收到有关弃用的警告后,请考虑您希望将来如何维护相关应用程序。

关于PHP 5.3 magick 引用 gpc,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10628032/

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