Home > Article > Backend Development > 360 universal PHP protection code (detailed explanation of usage)_PHP tutorial
360 released a universal PHP protection code. In fact, it was originally used to assist phpcms in protecting security. Now it seems that it can be added to any website with vulnerabilities. For the phpcmsv9 problem, the solution is as follows, and so on for other websites!
1. Transfer 360_safe3.php to the directory of the file to be included
2. Add protection to the page. There are two ways to do it. Choose one according to the situation:
a). Add code to the page that needs protection
require_once('360_safe3.php');
You can achieve page injection prevention and cross-site
If you want to prevent injection for the entire site, just put it in a public file on the website, such as the database link file config.inc.php!
Add require_once('360_safe3.php'); to call this code
Commonly used php system add files
PHPCMS V9 phpcmsbase.php
PHPWIND8.7 datasql_config. php
DEDECMS5.7 datacommon.inc.php
DiscuzX2 configconfig_global.php
Wordpress wp-config.php
Metinfo includehead.php
b). In each Add the code
at the beginning of the file and find it in php.ini:
Automatically add files before or after any PHP document.
auto_prepend_file = 360_safe3.php path;
------ ----------------------------------
360_safe3.php The source file is as follows, you can refer to it. Click to download