index.php was modified because the server was hacked or the password was tampered with. The solution is to modify ftp to a read-only attribute, or turn off the security attribute to prohibit modifying "register_globals =Off" to "on ".
The reason why index.php was modified:
1. The server was hung;
2. The code is not strict and the administrator rights are taken away by others.
Solution:
1. Change ftp to read-only attribute;
2. Do not turn on the security attribute. Do not use off in register_globals = Off. Change on;
3. Check for code leaks, such as upload permissions. Then it is recommended to change the FTP password and database password.
For more related knowledge, please visit PHP Chinese website!
The above is the detailed content of What should I do if index.php has been modified?. For more information, please follow other related articles on the PHP Chinese website!