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 פגז בסגנון (פרל סגנון) תגובות. In PHP, // or # is used to make a single-line comment or /* and */ to make a large comment block that spans several lines. ב-PHP, / / או # משמש כדי להפוך את שורת הערה אחת או / ו * * / לבצע גדול התגובה לחסום כי spans כמה שורות.
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 Block) יהיה מודפס. 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. ככל שניתן.
Related Articles מאמרים קשורים
- 3 Column Relaxation WordPress Theme comments-paged.php for Paged-Comments WordPress Plugin טור 3 הרפיה WordPress נושאים תגובות ל-paged.php מעומד תגובות-WordPress Plugin
- How to Add and Put Picture or Image in MySpace Comment כיצד להוסיף ולשים תמונה או תמונה של MySpace תגובה
- How to List and Show WordPress Posts That Comments and Pings Off (Not Allow) כיצד לרשימת WordPress הצג הודעות זה תגובות ו Pings Off (לא תאפשר)
- Fight and Stop Comment Spam and Trackback Spam with Akismet להילחם ולעצור תגובה דואר זבל דואר זבל ו Trackback עם Akismet
- Free Download: Akismet for WordPress Plugin 2.0 to Stop Comment, Trackback and Pingback Spam הורדה חינם: Akismet עבור WordPress Plugin 2.0 לעצור תגובה, Trackback ספאם ו Pingback
- Google AdSense Policy Update Disallows Image Besides Ads Blocks מדיניות Google AdSense, ביטול האפשרות עדכן מודעות תמונה בנוסף חוסמת
- Stop Comment, Pingback and Trackback Spam with New Version of Akismet עצור תגובה, Pingback ו Trackback ספאם עם הגירסה החדשה של Akismet
- Reduce Server Load Using Akismet to Automatically Discard Spam Comments on Posts Older than A Month צמצום השימוש שרת טען Akismet בטל באופן אוטומטי על הודעות דואר זבל הערות ישן יותר מאשר שנה
- Moderate WordPress Blog Comments Via Moderator with Desktop Client בלוג WordPress מתון תגובות עם שולחן העבודה באמצעות מנהלי הלקוחות
- Integrate WordPress including Comments with bbPress Forum using bbSync לשלב WordPress כולל הערות עם bbPress פורום באמצעות bbSync










































January 16th, 2009 01:11 ינואר 16, 2009 01:11
[...] Er is een hack waarmee toch Hoge kwaliteit video kan geïntegreerd worden. [...] Er היא een גרזן waarmee toch Hoge kwaliteit וידאו kan geïntegreerd worden. Zie How to Embed High Quality and Higher Resolution YouTube Videos on Blog or Website » My Digital Life [...] Zie כיצד שבץ באיכות גבוהה ברזולוציה גבוהה יותר וידאו ב-YouTube בלוג או אתר אינטרנט »Digital החיים שלי [...]
December 10th, 2007 01:30 10 דצמבר 2007 01:30
[...] tip of the hat to My Digital Life for his article - Comments and Comment Blocks in PHP. [...] עצה של הכובע שלי על החיים הדיגיטלי שלו מאמר - דרכים תגובה תגובות ו ב PHP. By Alec Tags: [...] מאת Alec תגיות: [...]
July 26th, 2006 06:45 יולי 26, 2006 06:45
[...] [...] http://www.mydigitallife.info/2006/04/26/dis… http://www.mydigitallife.info/2006/04/26/dis ... . . [...] [...]