Re: what is the use of file.... PHP is also very useful for integrating web pages with databases.
The PHP scripting language resembles JavaScript, Java, and Perl, These languages all share a common ancestor, the C programming language.
PHP is most different from JavaScript and Java. PHP is a server-side scripting language. All of the “work” is done on the server. JavaScript (and Java) generally run on the client. They have little access to the information that the server has, and mediated access to information on the client. They can do lots of things on the client that PHP cannot. PHP has full access to the information that the server has, and very little access to information that the client has. In fact, it only has information that the client tells the server and that the server passes on to PHP. Because it is on the server, however, PHP cannot be modified by the client. While you cannot necessarily trust the information that the client gives to PHP, you can trust that your PHP is doing what you told it to do. Because PHP is on the server end, your PHP scripts can affect your server--such as by keeping an activity log or updating a database. |