Comments and Comment Blocks in PHP Komentar Komentar dan Blok di PHP

PHP supports C language, C++ programming language and Unix shell-style (Perl style) comments. PHP mendukung bahasa C, C + + bahasa pemrograman dan Unix shell-style (Perl gaya) komentar. In PHP, // or # is used to make a single-line comment or /* and */ to make a large comment block that spans several lines. Di PHP, / / atau # digunakan untuk membuat komentar baris tunggal atau / * dan * / untuk membuat blok komentar yang besar spans beberapa baris.

For example: Sebagai contoh:

<?php <? php

echo 'This is a test'; //This is a single-line C++ style comment echo "Ini merupakan ujian '; / / ini adalah satu-baris C + + gaya komentar
echo 'This is another test';#This is another single-line shell-style comment echo 'Ini adalah satu lagi ujian'; # Ini adalah satu-line shell-gaya komentar
/* This is a multi line comment / * Ini adalah beberapa baris komentar
Second line of comment */ Kedua baris komentar * /

?> ?>

The “one-line” comment styles comment to the end of the line or the current block of PHP code, whichever comes first. Yang "satu baris" komentar gaya komentar ke akhir baris saat ini atau blok kode PHP, yang mana lebih dulu. 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. Ini berarti bahwa kode HTML setelah script PHP (PHP dengan modus rusak?> Dan kembali ke mode HTML setelah akhir blok kode PHP) akan dicetak. If the asp_tags configuration directive is enabled, it behaves the same with // %> and # %>. Jika asp_tags konfigurasi direktif diaktifkan, it behaves yang sama dengan / /%> dan #%>. However, the </script> tag doesn't break out of PHP mode in a single-line comment. Namun, </ script> tag tidak lolos PHP dalam modus satu-baris komentar.

For example, Misalnya,

<h1>This is an <?php # echo 'simple';?> example.<h1> Ini merupakan <h1> <? php # echo 'sederhana';?> contoh. <h1>
<p>The header above will say 'This is an example'.</p> Seluruh judul yang di atas akan berkata "Ini adalah contoh '. </ p>

C or C++ style comments end at the first */ encountered. C atau C + + gaya komentar di akhir pertama * / dihadapi. 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. Apapun nested / * dan * / gaya komentar akan menyebabkan kesalahan, dan it's pretty mudah untuk membuat kesalahan jika Anda mencoba untuk keluar komentar besar blok kode.

<?php <? php

/* / *
echo 'This is a test'; /* This comment will cause a problem */ echo "Ini merupakan ujian '; / * komentar ini akan menyebabkan masalah * /
*/ * /

?> ?>

The PHP comments is useful when you want to comment or disable a large portion of HTML. PHP komentar yang berguna jika anda ingin komentar atau menonaktifkan besar dari 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 */. Sebaliknya komentar kode HTML baris oleh baris, menempatkan seluruh HTML blok kode PHP ke dalam blok (yakni, tambahkan <? Php dan?>) Dan komentar dengan / * dan * /.

IMPORTANT : The page is machine translated and provided "as is" without warranty. PENTING: Halaman yang diterjemahkan mesin dan diberikan "sebagaimana adanya" tanpa jaminan. Machine translation may be difficult to understand. Mesin terjemahan mungkin sulit dimengerti. Please refer to Silakan merujuk ke original English article artikel asli Inggris whenever possible. bila memungkinkan.


3 Responses to “Comments and Comment Blocks in PHP” 3 Responses to "Komentar dan Komentar Blok di PHP"

  1. Walter De Vos » Hoe High Quality YouTube Videos embedden Walter De Diberkatilah »Hoe Kualitas tinggi YouTube Video embedden
    January 16th, 2009 01:11 Januari 16, 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 video kan geïntegreerd worden. Zie How to Embed High Quality and Higher Resolution YouTube Videos on Blog or Website » My Digital Life [...] Zie Bagaimana Embed Kualitas tinggi dan Resolusi Tinggi YouTube Video Website atau di Blog »My Life Digital [...]

  2. How to Comment Code in WordPress Templates Bagaimana Komentar Kode Wordpress Template
    December 10th, 2007 01:30 10 Des 2007 01:30
    2 2

    [...] tip of the hat to My Digital Life for his article - Comments and Comment Blocks in PHP. [...] Tip of the hat ke My Digital Life untuk artikelnya - Komentar dan Komentar Blok di PHP. By Alec Tags: [...] Oleh Alec Tag: [...]

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

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

Leave a Reply Meninggalkan Balas

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> Anda dapat menggunakan tag ini: <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. Berlangganan ke fitur komentar telah dinonaktifkan. To receive notification of latest comments posted, subscribe to Untuk menerima pemberitahuan komentar diposting terbaru, berlangganan My Digital Life Comments RSS feed Saya Digital Life Komentar RSS feed or atau register to receive mendaftar untuk menerima new comments in daily email digest. komentar baru di email harian digest.
Custom Search

New Articles Artikel Baru

Incoming Search Terms for the Article Cari Syarat masuk untuk Artikel

comment out php komentar dari php - -- coment php coment php - -- php coment php coment - -- how to comment out php bagaimana komentar dari php - -- php comment out php keluar komentar - -- php comment blocks php komentar blok - -- php coments php coments - -- coments in php coments di php - -- comentar em php comentar em php - -- php comment block php komentar blok - -- coments php coments php - -- comentário php Komentar php - -- comment out in php komentar di php - -- php comment out block php komentar keluar blok - -- coment in php coment di php - -- coment on php coment di php - -- comentario em php comentario em php - -- como comentar em php como comentar em php - -- all semua - -- comentário em php Komentar em php - -- html comment block html komentar blok - -- comment block in php komentar blok di php - -- myspace comment blocks myspace comments blok - -- php comentario php comentario - -- comment out php script komentar dari php script - -- php block comments php blok komentar - -- comentários php php komentar - -- comment blocks in php komentar blok di php - -- PHP comment block code PHP blok kode komentar - -- how to coment in php cara coment di php - -- comment block php komentar blok php - -- comentario en php comentario en php - -- comment blocks of php komentar blok php - -- how to comment out php code bagaimana komentar keluar kode php - -- comment blocks PHP komentar blok PHP - -- comment block of php code komentar blok kode php - -- block comment php blok komentar php - -- comentários em php komentar em php - -- coment out php coment dari php - -- comment php blocks php blok komentar - -- myspace comments blocks myspace comments blok - -- php comment out blocks of code php komentar dari blok kode - -- php + comment out a block of code php + komentar satu blok kode - -- comment block of code php komentar blok kode php - -- comentarios em php komentar em php - -- "comment out in php" "komentar di php" - -- comentario php php comentario - -- block comment out php blok komentar dari php - -- comment block in html blok komentar di html - -- comentar no php comentar no php - --