When PHP parses a file, it looks for the start , the tag tells PHP to start and stop explaining the code in it. Parsing this way allows PHP to be embedded in a variety of documents that are ignored by the PHP parser in the case of anything other than a pair of start and end tags. In most cases, PHP is embedded in an HTML document. A single-line comment only comments to the end of the line or the current PHP code block, depending on which first appears. This means that in//...? > or # ...? The HTML code after > is displayed:?> jumps out of PHP mode and returns to HTML mode,//or #并不能影响到这一点. As can be seen from the above discussion, even if?> appears in//comments, the PHP parser will think that the PHP parsing is finished (when PHP touches the end tag?>, it simply outputs the contents as it is (unless followed by a new line, see instruction Delimiter) until the next start tag is encountered). ($a, $b),//print_r ($b), output:!php preg.php| ', $a, $b);//print_r ($b); www.2cto.com How to fix the above problem? or you use/*/to comment, or connect?> with a string connector, as follows: | ', $a, $b);p Rint_r ($b); This same detail applies to the JS end tag
http://www.bkjia.com/PHPjc/477812.html www.bkjia.com true http://www.bkjia.com/PHPjc/477812.html techarticle when PHP parses a file, will it look for the start? PHP and end tag?, the tag tells PHP to start and stop explaining the code in it. Parsing this way allows PHP to be embedded in a variety of different documents ...