Comments and Comment Blocks in PHP Коментарі та коментар блоків в PHP

PHP supports C language, C++ programming language and Unix shell-style (Perl style) comments. PHP підтримує C, C + + мова програмування та оболонки Unix-стиль (Perl-стиль) зауваження. In PHP, // or # is used to make a single-line comment or /* and */ to make a large comment block that spans several lines. У PHP, / / або # використовується для виробництва одного-лайн коментар або / * і * / зробити велике зауваження, що блок охоплює кілька напрямків.

For example: Наприклад:

<?php <? PHP

echo 'This is a test'; //This is a single-line C++ style comment Відлуння 'Це тест'; / / Це є однією рядка C + + стилем коментарю
echo 'This is another test';#This is another single-line shell-style comment Відлуння "Це ще один тест '; # Це ще однієї лінії корпусу в стилі коментар
/* This is a multi line comment / * Це кілька рядків коментарю
Second line of comment */ Другий рядок коментарю * /

?> ?>

The “one-line” comment styles comment to the end of the line or the current block of PHP code, whichever comes first. "Один-лайн" Коментар стилем коментарю до кінця рядка або поточного блоку PHP-коду, що настане раніше. This means that HTML code after the PHP script block (PHP mode broken with ?> and returns to HTML mode after end of PHP code block) will be printed. Це означає, що HTML код після PHP скрипт блоку (PHP режим з сломанной?> І повертає в режим HTML після закінчення блоку PHP-коду), буде надрукований. If the asp_tags configuration directive is enabled, it behaves the same with // %> and # %>. Якщо директива конфігурації asp_tags включений, він веде себе з тією ж / /%> і #%>. However, the </script> tag doesn't break out of PHP mode in a single-line comment. Тим не менш, </ SCRIPT> тег, не вийти з режиму PHP в одному рядку коментар.

For example, Наприклад,

<h1>This is an <?php # echo 'simple';?> example.<h1> <h1> Це <? PHP # відлуння 'простий';?> приклад. <h1>
<p>The header above will say 'This is an example'.</p> <p> Заголовок вище буде сказати: "Це приклад". </ P>

C or C++ style comments end at the first */ encountered. C або C + + Стиль коментарі наприкінці першого * / зіткнулися. Any nested /* and */ style comments will cause error, and it's pretty easy to make this mistake if you are trying to comment out a large block of code. Будь-які вкладені / * і * / стиль коментарів викличе помилку, і це дуже легко зробити цю помилку, якщо ви намагаєтеся закоментувати великий блок коду.

<?php <? PHP

/* / *
echo 'This is a test'; /* This comment will cause a problem */ Відлуння 'Це тест'; / * Цей коментар викличе проблему * /
*/ * /

?> ?>

The PHP comments is useful when you want to comment or disable a large portion of HTML. У PHP коментарі корисно, якщо Ви хочете прокоментувати або відключити більшу частину HTML. Instead comment the HTML code line by line, put the whole HTML block into PHP code block (ie, add <?php and ?>) and comment with /* and */. Замість коментарю в HTML код построчное, поставити весь блок HTML коду PHP в блок (наприклад, додати <? PHP і ">) І коментар з / * і * /.

IMPORTANT : The page is machine translated and provided "as is" without warranty. Увага: Ця сторінка машина переведена і надаються "як є" без гарантії. Machine translation may be difficult to understand. Машинний переклад може бути важким для розуміння. Please refer to Будь ласка, зверніться до original English article Англійська оригінальні статті whenever possible. коли це можливо.


3 Responses to “Comments and Comment Blocks in PHP” 3 Відповіді на "Зауваження та коментар блоків в PHP"

  1. Walter De Vos » Hoe High Quality YouTube Videos embedden Вальтер Де Вос »Hoe Висока якість відео YouTube embedden
    January 16th, 2009 01:11 Січень 16, 2009 01:11
    3 3

    [...] Er is een hack waarmee toch Hoge kwaliteit video kan geïntegreerd worden. [...] Er є Een обхідні waarmee toch Hoge kwaliteit відео-кан geïntegreerd Уорд. Zie How to Embed High Quality and Higher Resolution YouTube Videos on Blog or Website » My Digital Life [...] Zie Як Ввести високої якості і більш високою роздільною здатністю YouTube відео на блог або сайт »Моя Цифрова життя [...]

  2. How to Comment Code in WordPress Templates Як залишити коментар в кодексі WordPress Шаблони
    December 10th, 2007 01:30 10 грудня 2007 01:30
    2 2

    [...] tip of the hat to My Digital Life for his article - Comments and Comment Blocks in PHP. [...] Краю капелюсі в Мій Цифрова життя за його статтю - Коментарі та коментар блоків в PHP. By Alec Tags: [...] За Алек Мітки: [...]

  3. E-Volution IT » Blog Archive » Windows Genuine Advantage circumvention E-завиток ІТ »Архів блога» Windows Genuine Advantage обхід
    July 26th, 2006 06:45 26 липня 2006 06:45
    1 1

    [...] [...] http://www.mydigitallife.info/2006/04/26/dis… http://www.mydigitallife.info/2006/04/26/dis ... . . [...] [...]

Leave a Reply Залишити Відповісти

Ім'я

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> Ви можете використовувати ці теги: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <дель Datetime = ""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. Підписатися на коментарі функція була відключена. To receive notification of latest comments posted, subscribe to Щоб отримувати повідомлення про останніх коментарів, підписка на My Digital Life Comments RSS feed Моя Цифрова життя Коментарі RSS канал or або register to receive зареєструватися, щоб отримати new comments in daily email digest. нових коментарів у щоденній електронній пошті дайджест.
Custom Search

New Articles Нові статті

Incoming Search Terms for the Article Вхідний Умови пошуку для статті

comment out php Коментарі в PHP - -- coment php coment PHP - -- php coment PHP coment - -- how to comment out php Як закоментувати PHP - -- php comment out PHP закоментувати - -- php comment blocks PHP коментар блоків - -- php coments PHP Коментар - -- coments in php Коментарі в PHP - -- comentar em php comentar EM PHP - -- php comment block PHP коментар блок - -- coments php Коментар PHP - -- comentário php PHP коментар - -- comment out in php Коментарі в PHP - -- php comment out block PHP закоментувати блок - -- coment in php coment на PHP - -- coment on php coment на PHP - -- comentario em php коментар EM PHP - -- como comentar em php Кому comentar EM PHP - -- all всі - -- comentário em php коментар EM PHP - -- html comment block HTML коментар блок - -- comment block in php Блок коментарів в PHP - -- myspace comment blocks Myspace коментарі блоків - -- php comentario PHP коментар - -- comment out php script Коментарі в PHP-скрипт - -- php block comments PHP блок коментарів - -- comentários php Коментарі PHP - -- comment blocks in php Коментарі блоків в PHP - -- PHP comment block code PHP коментар блок коду - -- how to coment in php Як coment на PHP - -- comment block php коментар блоку PHP - -- comentario en php коментар в PHP - -- comment blocks of php Коментарі блоків PHP - -- how to comment out php code Як закоментувати PHP-коду - -- comment blocks PHP Коментарі блоків PHP - -- comment block of php code Коментарі блоку PHP-коду - -- block comment php Блок коментарів PHP - -- comentários em php Коментарі EM PHP - -- coment out php coment з PHP - -- comment php blocks Коментарі PHP блоків - -- myspace comments blocks Myspace коментарі блоків - -- php comment out blocks of code PHP закоментувати блок коду - -- php + comment out a block of code PHP + закоментувати блок коду - -- comment block of code php Коментарі блоку PHP-коду - -- comentarios em php Коментарі EM PHP - -- "comment out in php" "Коментар в PHP" - -- comentario php PHP коментар - -- block comment out php Блок закоментувати PHP - -- comment block in html коментар блоку в HTML - -- comentar no php comentar НЕ PHP - --