PHP娉ㄩ噴

PHP 鏀寔 C锛孋++ 鍜 Unix Shell 椋庢牸锛圥erl 椋庢牸锛夌殑娉ㄩ噴銆
PHP 鏀寔 C锛孋++ 鍜 Unix Shell 椋庢牸锛圥erl 椋庢牸锛夌殑娉ㄩ噴銆備緥濡: <?php
    echo "This is a test"; // This is a one-line c++ style comment
    /* This is a multi line comment
       yet another line of comment */
    echo "This is yet another test";
    echo 'One Final Test'; # This is a one-line shell-style comment
?>

鍗曡娉ㄩ噴浠呬粎娉ㄩ噴鍒拌鏈垨鑰呭綋鍓嶇殑 PHP 浠g爜鍧楋紝瑙嗕箮鍝釜棣栧厛鍑虹幇銆傝繖鎰忓懗鐫鍦 // ... ?> 鎴栬 # ... ?> 涔嬪悗鐨 HTML 浠g爜灏嗚鏄剧ず鍑烘潵锛?> 璺冲嚭浜 PHP 妯″紡骞惰繑鍥炰簡 HTML 妯″紡锛// 鎴 # 骞朵笉鑳藉奖鍝嶅埌杩欎竴鐐广傚鏋滃惎鐢ㄤ簡 asp_tags 閰嶇疆閫夐」锛屽叾琛屼负鍜 // %> 鎴 # %> 鐩稿悓銆備笉杩囷紝</script> 鏍囪鍦ㄥ崟琛屾敞閲婁腑涓嶄細璺冲嚭 PHP 妯″紡銆

<h1>This is an <?php # echo "simple";?> example.</h1>
<p>The header above will say 'This is an example'.

C 椋庢牸鐨勬敞閲婂湪纰板埌绗竴涓 */ 鏃剁粨鏉熴傝纭繚涓嶈宓屽 C 椋庢牸鐨勬敞閲娿傝瘯鍥炬敞閲婃帀涓澶у潡浠g爜鏃跺緢瀹规槗鍑虹幇璇ラ敊璇

<?php
 /*
    echo "This is a test"; /* This comment will cause a problem */
 */
?>

浠ヤ笂灏辨槸PHP娉ㄩ噴鐨勮缁嗗唴瀹癸紝鏇村淇℃伅璇峰叧娉∣D浜戝叾瀹冪浉鍏虫枃绔狅紒



鏈枃URL锛http://www.odweb.cn/news_show.html?id=44