Get the App
SLTechnology News&Howtos  ›  Development  › 

What does the universal php protection code look like

Shulou Source: shulou.com Published: 2022-06-03 06:23:29 11月16日 Update

This article mainly shows you "what kind of 360 general php protection code is", the content is simple and easy to understand, clear organization, I hope to help you solve doubts, let Xiaobian lead you to study and learn "what kind of 360 general php protection code is" this article bar.

360 released generic php protection code, in fact, initially to assist phpcms to protect security, now it seems that you can join any vulnerable website inside, take phpcmsv9 problem, the solution is as follows, other websites and so on!

1. Pass 360_safe3.php to the directory of files to include

2. There are two ways to add protection to the page. Choose one of them according to the situation:

a). Add code to the page you want to protect

require_once('360_safe3.php');

You can do page injection prevention, cross-site

If you want to prevent the entire site, it is in a common file on the site, such as the database link file config.inc.php!

Add require_once ('360_safe3.php '); to invoke this code

Common php system add files

PHPCMS V9 \phpcms\base.php

PHPWIND8.7 \data\sql_config.php

DEDECMS5.7 \data\common.inc.php

DiscuzX2 \config\config_global.php

Wordpress \wp-config.php

Metinfo \include\head.php

b). Add a code to the top of each file

Find in php.ini:

Automatically add files before or after any PHP document.

auto_prepend_file = 360_safe3.php path;

The above is "360 general php protection code is what kind of" all the content of this article, thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!

Tags: Code protection files content articles websites pages learning help security and so on practices common use situations data databases solutions easy to understand more organized Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Microsoft Xiaomi OPPO Reno NVidia