Comments and Comment Blocks in PHP Pastabos ir komentarai Kvadratai PHP

PHP supports C language, C++ programming language and Unix shell-style (Perl style) comments. PHP palaiko C kalba C + + programavimo kalba ir Unix shell stiliaus (Perl stiliumi) pastabas. In PHP, // or # is used to make a single-line comment or /* and */ to make a large comment block that spans several lines. PHP, / / arba # naudojama atlikti vienoje eilutėje komentarą ar / * ir * / padaryti didelės komentarą blokas, kuri apima keletą eilučių.

For example: Pavyzdžiui:

<?php <? Php

echo 'This is a test'; //This is a single-line C++ style comment echo "Tai yra testas"; / / Tai vienos eilutės C + + stiliaus komentarus
echo 'This is another test';#This is another single-line shell-style comment echo "Tai kitas testas"; # Tai dar vienos linijos lukštais stiliaus komentarą
/* This is a multi line comment / * Tai daugeliui linija komentarą
Second line of comment */ Antroji eilutė comment * /

?> ?>

The “one-line” comment styles comment to the end of the line or the current block of PHP code, whichever comes first. "Viena linija" komentarą stilių komentarą linijos pabaigoje, ar dabartinės bloko PHP kodas, kas įvyks anksčiau. 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. Tai reiškia, kad HTML kodas po PHP skripto bloke (režimo PHP neveikia su> ir grąžina į HTML režimą po pabaigos PHP kodas blokas) bus spausdinamas. If the asp_tags configuration directive is enabled, it behaves the same with // %> and # %>. Jei asp_tags konfigūracijos direktyvos įjungtas, jis elgiasi kaip ir / /%> ir #%>. However, the </script> tag doesn't break out of PHP mode in a single-line comment. Tačiau, </ script> tag nėra Zawołać PHP režimą vienos eilutės pastabas.

For example, Pavyzdžiui,

<h1>This is an <?php # echo 'simple';?> example.<h1> <h1> Tai <? php # echo "paprastas";?> pvz. <h1>
<p>The header above will say 'This is an example'.</p> <p> antraštė virš pasakys: "Tai yra pavyzdys". </ p>

C or C++ style comments end at the first */ encountered. C ar C + + stiliaus komentarus pabaigos pirmojo * / sunkumus. 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. Bet zagnieżdżonych / * ir * / style komentarai sukelti klaidos, ir tai labai lengva padaryti šią klaidą, jeigu Jūs bandote komentarą iš didelių blokų kodo.

<?php <? Php

/* / *
echo 'This is a test'; /* This comment will cause a problem */ echo "Tai yra testas"; / * Šis komentaras sukels problemų * /
*/ * /

?> ?>

The PHP comments is useful when you want to comment or disable a large portion of HTML. PHP komentarai yra naudinga, kai norite komentuoti arba išjungti didelę 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 */. Vietoj komentarą į HTML kodą pagal kiekvieną eilutę, pastatyti visą HTML bloko PHP kodo fragmentą (pavyzdžiui, pridėti <? Php ir?>) Ir komentarai / * ir * /.

IMPORTANT : The page is machine translated and provided "as is" without warranty. DĖMESIO: Šis puslapis yra mašina išvertė ir pateikiama "kaip yra" be garantijų. Machine translation may be difficult to understand. Mašininio vertimo, gali būti sunku suprasti. Please refer to Remkitės original English article originalas anglų straipsnis whenever possible. jei įmanoma.


3 Responses to “Comments and Comment Blocks in PHP” 3 Responses to "Pastabos ir komentarai Kvadratai PHP"

  1. Walter De Vos » Hoe High Quality YouTube Videos embedden Walter De Vos »Motyka Aukštos kokybės" YouTube "vaizdo embedden
    January 16th, 2009 01:11 Sausis 16th, 2009 01:11
    3 3

    [...] Er is een hack waarmee toch Hoge kwaliteit video kan geïntegreerd worden. [...] Er is een Hack waarmee Toch Hoge Kwaliteit vaizdo kan geïntegreerd worden. Zie How to Embed High Quality and Higher Resolution YouTube Videos on Blog or Website » My Digital Life [...] Zie Kaip Įterpti Aukštos kokybės ir didesnės raiškos YouTube Video Blog arba Svetainė »Mano skaitmeninis gyvenimas [...]

  2. How to Comment Code in WordPress Templates Kaip komentuoti kodas WordPress šablonai
    December 10th, 2007 01:30 Gruodžio 10 d. 2007 01:30
    2 2

    [...] tip of the hat to My Digital Life for his article - Comments and Comment Blocks in PHP. [...] Viršūnę skrybėlių į Mano skaitmeninis gyvenimas jo straipsnis - Komentarai ir komentuoti Kvadratai PHP. By Alec Tags: [...] By Alec Tags: [...]

  3. E-Volution IT » Blog Archive » Windows Genuine Advantage circumvention E-Sukimosi IT »Blog Archive» Windows Genuine Advantage apeiti
    July 26th, 2006 06:45 26 liepa 2006 06:45
    1 1

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

Leave a Reply 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> Galite naudoti šias žymeles: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime = ""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. Subscribe to comments funkcija buvo išjungta. To receive notification of latest comments posted, subscribe to Norėdami gauti pranešimus apie naujausius komentarų, užsiprenumeruoti My Digital Life Comments RSS feed Mano skaitmeninis gyvenimas Komentarų RSS or arba register to receive registruotis, norint gauti new comments in daily email digest. Nauji komentarai kasdien elektroniniu paštu.
Custom Search

New Articles Nauji straipsniai

Incoming Search Terms for the Article Pradedantys Paieška Sąlygos straipsnį

comment out php jame Php - -- coment php coment Php - -- php coment Php coment - -- how to comment out php kaip komentarą iš Php - -- php comment out Php pastabas iš - -- php comment blocks Php komentarą blokų - -- php coments Php coments - -- coments in php coments PHP - -- comentar em php comentar em php - -- php comment block Php komentarą blokas - -- coments php coments Php - -- comentário php komentarą Php - -- comment out in php komentarą iš Php - -- php comment out block Php jame bloke - -- coment in php coment PHP - -- coment on php coment apie php - -- comentario em php Komentarai em php - -- como comentar em php kaip comentar em php - -- all visi - -- comentário em php komentarą em php - -- html comment block html komentarą blokas - -- comment block in php pastabas bloko Php - -- myspace comment blocks myspace komentarą blokų - -- php comentario Php komentarą - -- comment out php script komentarą iš PHP skripto - -- php block comments Php blokuoti komentarai - -- comentários php komentarus Php - -- comment blocks in php komentaras blokų Php - -- PHP comment block code PHP komentarą bloko kodas - -- how to coment in php kaip coment PHP - -- comment block php komentaras blokuoti Php - -- comentario en php comentario en php - -- comment blocks of php komentaras blokai Php - -- how to comment out php code kaip komentarą iš php kodą - -- comment blocks PHP komentaras blokai PHP - -- comment block of php code komentaras blokas kodo php - -- block comment php blokuoti komentarą Php - -- comentários em php komentarus em php - -- coment out php coment iš Php - -- comment php blocks komentaras Php blokų - -- myspace comments blocks myspace komentarai blokų - -- php comment out blocks of code Php komentarą iš blokų kodas - -- php + comment out a block of code Php + jame blokas kodas - -- comment block of code php komentaras blokas kodo php - -- comentarios em php komentarų em php - -- "comment out in php" "komentaro į php" - -- comentario php Komentarai Php - -- block comment out php blokuoti komentarus iš Php - -- comment block in html komentaras blokuoti html - -- comentar no php comentar ne php - --