Comments and Comment Blocks in PHP Kommentare Kommentar-Blöcke in PHP

PHP supports C language, C++ programming language and Unix shell-style (Perl style) comments. PHP unterstützt die Sprache C, C + + Programmiersprache und Unix-Shell-Stil (Perl-Stil) kommentiert. In PHP, // or # is used to make a single-line comment or /* and */ to make a large comment block that spans several lines. In PHP, / / oder # verwendet wird, um eine Single-Line oder Kommentar / * und * /, um einen großen Block Kommentar, dass mehrere Zeilen umfasst.

For example: Zum Beispiel:

<?php <? php

echo ‘This is a test’; //This is a single-line C++ style comment echo "Dies ist ein Test"; / / Dies ist ein Single-Line C + +-Stil Kommentar
echo ‘This is another test’;#This is another single-line shell-style comment echo "Dies ist ein weiterer Test '; # Dies ist eine weitere Single-Line-Shell-Stil Kommentar
/* This is a multi line comment / * Dies ist ein Multi-Kommentar
Second line of comment */ Die zweite Zeile des comment * /

?>

The “one-line” comment styles comment to the end of the line or the current block of PHP code, whichever comes first. Das "one-line" Kommentar Stile Kommentar zum Ende der Zeile oder den aktuellen Block von PHP-Code, welcher Fall zuerst eintritt. 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. Dies bedeutet, dass HTML Code nach der PHP-Skript Block (PHP Modus defekt?> Und wieder in den HTML-Modus nach dem Ende der PHP-Code-Block) wird gedruckt. If the asp_tags configuration directive is enabled, it behaves the same with // %> and # %>. Wenn die Direktive asp_tags aktiviert ist, es verhält sich mit der gleichen / /%> und #%>. However, the </script> tag doesn’t break out of PHP mode in a single-line comment. Allerdings ist die </ script>-Tag nicht ausbrechen von PHP-Modus in einem einzigen Online-Kommentar.

For example, Zum Beispiel,

<h1>This is an <?php # echo ’simple’;?> example.<h1> <h1> Dies ist ein <? php # echo "einfaches";?> Beispiel. <h1>
<p>The header above will say ‘This is an example’.</p> <p> The header oben wird sagen: "Dies ist ein Beispiel". </ p>

C or C++ style comments end at the first */ encountered. C oder C + +-Stil Kommentare Ende bei der ersten * / begegnet. 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. Jede verschachtelte / * und * / style Kommentare werden dazu führen, dass Fehler, und es ist ziemlich leicht zu machen Fehler, wenn Sie versuchen, kommentieren Sie ein großer Block von Code.

<?php <? php

/* / *
echo ‘This is a test’; /* This comment will cause a problem */ echo "Dies ist ein Test"; / * Dieser Kommentar wird ein Problem verursachen * /
*/ * /

?>

The PHP comments is useful when you want to comment or disable a large portion of HTML. Die PHP-Kommentaren ist nützlich, wenn Sie wollen, zu kommentieren oder zu deaktivieren ein großer Teil von 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 */. Stattdessen kommentieren Sie den HTML-Code Zeile für Zeile, die den kompletten HTML-Block in PHP-Code-Block (dh, fügen Sie <? Php und?>) Und Kommentar mit / * und * /.

IMPORTANT : This is a machine translated page which is provided "as is" without warranty. WICHTIG: Es handelt sich um eine Maschine der Seite übersetzt wird "as is" ohne Garantie. Machine translation may be difficult to understand. Maschinelle Übersetzung ist vielleicht schwierig zu verstehen. Please refer to Bitte wenden Sie sich an original English article Original Englisch Artikel whenever possible. wann immer dies möglich ist.

Share and contribute or get technical support and help at Aktie und einen Beitrag oder erhalten technische Unterstützung und Hilfe an My Digital Life Forums Meine digitalen Lebens Foren .



2 Responses to “Comments and Comment Blocks in PHP” 2 Responses to "Kommentare und Kommentar-Blöcke in PHP"

  1. E-Volution IT » Blog Archive » Windows Genuine Advantage circumvention E-Volution-IT »Blog Archiv» Windows Genuine Advantage-Umgehung
    July 26th, 2006 06:45 26. Jul 2006 06:45
    1

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

  2. How to Comment Code in WordPress Templates Wie Kommentar-Code in WordPress-Templates
    December 10th, 2007 01:30 10. Dez 2007 01:30
    2

    [...] tip of the hat to My Digital Life for his article - Comments and Comment Blocks in PHP. [...] Spitze des Zu meinen Hut Digital Life für seine Artikel - Kommentare Kommentar Blöcke in PHP. By Alec Tags: [...] Mit Alec Tags: [...]

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> Sie können diese Tags: <a href= title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime = ""> <em> <i> <q Cite=""> <strike> <strong>

Subscribe without commenting Abonnieren ohne zu kommentieren


Custom Search

New Articles Neue Artikel

Incoming Search Terms for the Article Eingehender Suchbegriffe für den Artikel

comment out php Kommentar aus PHP - -- php comment out PHP kommentieren Sie - -- comentario em php comentario em PHP - -- how to comment out php wie kommentieren Sie PHP - -- comentário em php comentário em PHP - -- comentario php comentario PHP - -- comment out in php Kommentar in PHP - -- php coment PHP Bemerkungen - -- php coments PHP Kommentare - -- comment out php code kommentieren Sie PHP-Code - -- php comment PHP Kommentar - -- how to comment out PHP code wie kommentieren Sie PHP-Code - -- php comment blocks PHP Kommentar Blöcke - -- myspace comment blocks MySpace Kommentar Blöcke - -- commenting out in php Kommentierung in PHP - -- comment blocks for myspace Kommentar Blöcke für MySpace - -- free coments kostenlos Kommentare - -- php comment block of code PHP Kommentar Block von Code - -- coment php Bemerkungen PHP - -- remark out php Bemerkung hin, PHP - -- comentario no php comentario keine PHP - -- comentário php PHP comentário - -- PHP comentario PHP comentario - -- comment out a block of code in unix kommentieren Sie ein Block von Code in UNIX - -- como comentar em PHP Como comentar em PHP - -- coment in php Bemerkungen in PHP - -- myspace comment bocks MySpace Kommentar bocks - -- hOW TO coment in PHP How to Bemerkungen in PHP - -- comment out a block of php Kommentar aus einem Block von PHP - -- php comment out blocks PHP kommentieren Sie Blöcke - -- php commenting PHP kommentieren - -- php Header Comment Blocks php header Kommentar Blöcke - -- commenting blocks in php Kommentieren Blöcke in PHP - -- php commenting out PHP-Kommentierung aus - -- php comment a block of code php Kommentar ein Block von Code - -- comment out block of php kommentieren Sie Block von PHP - -- php comment block PHP Kommentar Block - -- comment block in unix Kommentar Block in Unix - -- comment blocks on myspace Kommentar Blöcke auf MySpace - -- "comentario em php" "comentario em php" - -- how to comment out in php wie kommentieren Sie in php - -- comentários em php Comentários em PHP - -- comentario en php comentario de PHP - -- php coments code Kommentare PHP-Code - -- php block of comment PHP-Block von Kommentar - -- PHP commenting out a block of code PHP-Kommentierung aus einem Block von Code - -- free coments on internet Kommentare kostenlos im Internet - -- comment block for myspace Kommentar Block für MySpace - -- comentar php comentar PHP - -- comments tag block in pHP Kommentare Tag Block in PHP - --