Home >Backend Development >PHP Tutorial >Accumulation of PHP learning precautions

Accumulation of PHP learning precautions

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-07-29 09:13:581096browse

1. About PHP tags

When I was learning PHP code, I looked at the files written by others. Many of them only had PHP start tags<?, but no end tags. It turns out that this is the recommended way of writing in the official PHP manual.
If the file content is pure PHP code, it is best to remove the PHP closing tag at the end of the file. This can prevent php from accidentally adding spaces or newlines after the end tag, which will cause php to start outputting these spaces, and there is no intention to output them in the script at this time. The following files:

<code><?php
    echo "Hello world";

    // ... more code

    echo "Last statement";

    // 脚本至此结束,并无 PHP 结束标记
</code>
').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

The above has introduced the accumulation of precautions for learning PHP, including aspects of content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn