what can php do

      
       Why learn PHP? "I can use JavaScript to write programs." But JavaScript's capabilities are limited. JavaScript usually runs on the browser (client-side), and it can make special effects on web pages: the mouse slides over the background to change the color, and there are common mouse over the pop-up menu. But if you want the JavaScript implementation to display "the total number of visitors to the website", it can't do anything, because it can only get the information on the client side, and the "total number of people visiting the website" is stored on the server side. Therefore, another programming language that can run on the server side is needed, and the PHP language is one of them, because it can run on the Web server side.

      
       Before learning PHP let's get acquainted with PHP and its features.

      
   1. Running on the server side : After learning PHP, you can direct the server to work for you, or even destroy it ^_^ (you must not do this), most of the data of the WEB website is stored on the server side, PHP is used to process these data stored in the server (powerful).

     
      2. Cross-platform : The server can be a server of various platforms, such as Linux, Windows, Unix, you can command it (don't be afraid that you can only command one kind of server).

      
      3. Scripting language : It directs the server to work by writing scripts, that is, line-by-line computer instructions (which can also be understood as specific English words). In the process of communication, the language of communication is PHP.

      
       4. Free : Free to use (there is really a free lunch in the world).



It is very easy to write PHP code in the page, like the following code:
<?php
   echo "Want to learn php?";
?>


Just like you can write JavaScript scripting language that needs to be written between <script></script > tags , you can write PHP code in the page to write between <?php?> tags


You may also write the code on one line! Such as the following code:
<?php echo "Want to learn php?";?>

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325487201&siteId=291194637