Jianxin
First, for a website, its security is definitely not just the security of the server. To ensure information security for a server, you must ensure that the environment is secure. That is to say, the network environment in which a server is located is secure and that its data packets cannot be hijacked in the IDC environment, sighed. To ensure the security of the network environment, we also need to ensure the security of the server itself. A server is usually not only configured with one service, but also www and database run on one server. Therefore, ensure that all open services are safe, use appropriate firewall policies to stop unnecessary services, or allocate services to different hosts as much as possible. At least after your mysql server is infiltrated, your www Service is still secure. After ensuring the security of the server, there is still a lot of work to be done. If your server is not only open to one site, you also need to configure the security of the Server File System to ensure that each website is absolutely independent. Is that enough? No, you also need to ensure that your www service software has no defects. Make sure that the latest patches are identical to those on the server, so that you can filter out the dangerous factors in your configuration file.
If you are truly pursuing security, we can start to discuss php security after fully considering the above steps. Php security I want to include the security of php itself, as well as the scripting program written in php, that is, the security at the application level. The security of php includes the Security Configuration of php, including the defects of php underlying code.