dongwan5381 2017-07-26 08:05 采纳率: 100%
浏览 87
已采纳

黑客可以删除我使用下面功能的服务器文件和数据库吗? [重复]

This question already has an answer here:

I want to know how to protect my website from hacker. I am a php-mysql developer. For fetching data from database i always use mysqli. For prevent my website from sql injection i always use $db->real_esacpe_string() function of php. For prevent my website from XSS(Cross site scripting) i used this function

function parsing($text)
{
global $db;
        $text=$db->real_escape_string($text);
 $text= @trim($text);
       $text= strip_tags($text);
 if(get_magic_quotes_gpc()) {
            $text= stripslashes($text);
        }
    $text=str_replace('<','',$text);
    $text=str_replace('>','',$text);   
       $text=htmlspecialchars($text, ENT_QUOTES, 'UTF-8');
    return($text);
}
$name=parsing($_POST['name']);

Any suggestion from your side is welcomed. Thanks in advance.

</div>
  • 写回答

1条回答 默认 最新

  • dongyoucha0645 2017-07-26 08:32
    关注

    With all of does done i don't think a hacker can delete or access your database.

    But there are also many other techniques a hacker can use in hacking your website.

    Like

    1. DDOS
    2. XSS
    3. SESSION Hyjacking etc

    Which there are also different ways of protecting your website against them.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 yolov9的训练时间
  • ¥15 二叉树遍历没有报错但无法正常运行
  • ¥15 在linux系统下vscode运行robocup3d上场球员报错
  • ¥15 Python语言实验
  • ¥15 SAP HANA SQL 增加合计行
  • ¥20 用C#语言解决一个英文打字练习器,有偿
  • ¥15 srs-sip外部服务 webrtc支持H265格式
  • ¥15 在使用abaqus软件中,继承到assembly里的surfaces怎么使用python批量调动
  • ¥15 大一C语言期末考试,求帮助🙏🙏
  • ¥15 ch340驱动未分配COM