For php security questions, is index. PHP used as the homepage of the website secure? It is necessary to read the data library in a dynamic way, and do not use index.html to display the php file to dynamically display the php content. therefore, index is used. php is the homepage of the website. I don't know if it is safe. because index. the PHP file contains the database address and password. Is there any encryption method! I have also heard many people say that dynamic traffic is very resource-consuming. if traffic is restricted, will index. php be used as the homepage of the website for security issues?
It is necessary to read the data library in a dynamic way, and do not use index.html to display the php file to dynamically display the php content.
So index. php is used as the homepage of the website. I don't know if it is safe.
The index. php file contains the database address and database account password. Is there any encryption method!
I have heard many people say that dynamic pages consume resources. if traffic is restricted, isn't dynamic pages bad?
I am confused in many places because I just got in touch with PHP for a week. thank you very much for your enthusiastic help!
------ Solution --------------------
Index. php is the homepage of the website. I don't know if it is safe.
This does not exist. hackers will not be happy to find the vulnerability because they know that your website page is index. php. The first premise to ensure security is to filter client data (which can be called Escape) to prevent SQL injection and XSS attacks. Look at http://www.php.net/manual/zh/security.php
There is no encryption method. If someone else can see the database account password, basically the website you write will be useless. Don't worry about this. this is what others do.
Resource consumption?
Dynamic web pages require the server to perform a lot of operations (query databases, logical judgment, and so on), so it consumes a lot more system resources than static pages. A lot. If you are referring to bandwidth, there is no difference between dynamic and static. As long as you want to display the same content, static and dynamic traffic consumption is the same. In this case, the difference between dynamic and static is that the server still needs to execute the script, while static is directly read.
It is recommended that you familiarize yourself with the basic concepts of the manual to take a closer look, accumulated http://www.php.net/manual/zh/index.php
------ Solution --------------------
If there are parameters after index. php, you can add rewrite rules or encrypt the display.
If you are afraid of being insecure, you can write only one jump header () in index. php to jump to your actual homepage.