The difference between PHP and JAVA in website development
1. Comparison of database access:
PHP for different databases Different database access interfaces are used, so the versatility of the database access code is not strong. Java accesses the database through JDBC and can easily access the database through database drivers provided by different database vendors. The interface for accessing the database is relatively unified.
2. Security comparison:
In the face of JAVA, PHP has lost many advantages. Especially outstanding in the security of code. The PHP development program can be easily modified after others get the code. Programs developed by JAVA are more secure because they cannot see the complete source code and can only see some compiled class files.
3. Differences in development costs
PHP The most classic combination is: PHP MySQL Apache. It is very suitable for developing small and medium-sized Web applications. The development speed is relatively fast and the development cost is low. And all software is open source and free, which can reduce investment.
Java's Web application servers include free Tomcat, JBoss, etc. If you need better commercial services, they include: Web Sphere and Web logic.
For more PHP related knowledge, please visitphp中文网!
The above is the detailed content of What is the difference between java and php for making websites?. For more information, please follow other related articles on the PHP Chinese website!