PHP file formats summary

PHP's three file formats

The first:

<?php
     //代码部分
  ?>

The second:

<?php
     //代码部分

The third (sub-grid short tag):

<?
    //代码部分
?>

Note that part

1, PHP files ending in .php
2, you can use sub-grid short tag
Note: You must go through modify php.ini configuration file short_open_tag = Off this one, will be off to on
must be restarted after you finish remember to modify the configuration file service
3, need to pay attention to one end of the PHP code must tell your computer with a semicolon end I finished
4, the keyword - output [echo]

Published 15 original articles · won praise 10 · views 579

Guess you like

Origin blog.csdn.net/weixin_44439445/article/details/102980538