PHP µãÔËËã·û£¨.£©ÓëÊý¾ÝÀàÐÍת»»µÄÉîÈë̽ÌÖ
Èç¹û¹À¼Æû´í£¬ÔÚ PHP ÓïÑÔÖУ¬Ê¹ÓÃ×î¶àµÄÔËËã·ûºÅµ±ÊýµãÔËËã·ûºÅ“.”£¬Ê¹ÓÃ×î¶àµÄÓï¾äµ±Êý“echo”¡£²»ÄÑÀí½â£¬PHP µÄÄ¿±ê¾ÍÊÇÉú³É³¬Îı¾½Å±¾£¬¶ø³¬Îı¾½Å±¾¾ÍÊÇÓÉ×Ö·û´®×é³ÉµÄ£¬ËùÒÔ PHP ´¦Àí×î¶àµÄÊý¾Ýµ±ÊÇ×Ö·û´®£¬Òò´ËÁ¬½Ó×Ö·û´®µÄµãÔËËã·ûºÍÊä³ö×Ö·û´®µÄÓï¾ä“echo”¾Í±»¾³£Óõ½¡£
×î³£ÓõIJ»Ò»¶¨ÊÇ×îÊìϤµÄ¡£µ±ÎÒÃÇÇû÷ echo "...."; Óï¾äÊä³öÔËËã½á¹ûµÄʱºò£¬ÓÐ˸Ò˵×Ô¼ºÒѾ¶Ô×Ö·û´®¡¢µã·ûºÅÁËÈçÖ¸ÕÆ¡¢ÔËÓÃ×ÔÈçÁËÄØ£¿
±ÈÈ磬Óï¾ä echo '100'; ºÍ echo 100; Êä³öµÄ html ´úÂë½á¹û¶¼ÊÇ 100£¬ËûÃÇÓÐʲô²»Í¬£¿
ÔÙ±ÈÈ磬Óï¾ä echo 100.200; ºÍ echo 100[¿Õ¸ñ].[¿Õ¸ñ]200; Êä³ö½á¹ûÒ»ÑùÂð£¿ÎªÊ²Ã´£¿
……
1£¬Á˽â PHP ÊÇÒ»ÃÅ“ÈõÀàÐÍ”µÄÓïÑÔ
ÿÃżÆËã»úÓïÑÔ£¨ÎÒÖªµÀµÄ½«½ü20ÃÅÓïÑÔÖУ©£¬¶¼ÊÇÓÐÊý¾ÝÀàÐ͵ģ¬PHP ¸ÅĪÄÜÍâ¡£“ÈõÀàÐÍ”µÄÓïÑÔ²»ÊÇ˵¸ÃÓïÑÔûÓÐÊý¾ÝÀàÐÍ£¬¶øÊÇ˵ËüÈõ»¯»ò²»Ç¿µ÷Êý¾ÝÀàÐÍ£¬¾ßÌåµÄ˵£¬¾ÍÊDZäÁ¿ÔÚʹÓÃÇ°²»±ØÉùÃ÷Êý¾ÝÀàÐÍ£¬ÀàÐ͸ù¾ÝËù¸³ÖµµÄÀàÐÍÀ´¾ö¶¨£¬Í¬Ê±Ò²¶¨ÒåÁ˱äÁ¿±¾Éí¡£µ« PHP µÄº¯ÊýºÍ¸÷ÖÖ²Ù×÷·û£¨ÔËËã·û£©ÓÖÊÇÓбäÁ¿ºÍ²Ù×÷ÊýÀàÐÍÒªÇóµÄ¡£ËùÒÔ£¬²»¿É±ÜÃâµÄ£¬´æÔÚÒ»¸öÊý¾ÝÀàÐ͵Ä×Ô¶¯×ª»»ÎÊÌ⡣ǿÀàÐ͵ÄÓïÑÔ£¬±ÈÈç C¡¢C++¡¢Java¡¢C#£¬²»Í¬ÀàÐ͵ÄÊý¾ÝÊDz»ÔÊÐí²ÎÓë»ìºÏÔËËãµÄ£¬Èç¹ûÐèÒª£¬±ØÐèͨ¹ýһЩ·½·¨£¨±ÈÈ纯Êý¡¢ÀàµÄ·½·¨£©½øÐÐÀàÐÍת»»¡£µ« PHP ÊÇÔÊÐí²»Í¬ÀàÐ͵ÄÊý¾Ý½øÐлìºÏÔËËãµÄ(ÀàËÆ VbScript)£¬PHP ½âÊÍÒýÇæ×Ô¶¯×öÁËÀàÐÍת»»µÄ¹¤×÷¡£
2£¬Á˽â echo µÄ²Ù×÷Êý
echo ʵ¼ÊÉϲ»ÊÇÒ»¸öº¯Êý£¬¶øÊÇÒ»¸öÓïÑԽṹ£¬ËùÒÔËü¿ÉÒÔÓÃ³É echo('...')£¬Ò²¿ÉÒÔÓÃ³É echo '...'¡£echo µÄ²Ù×÷ÊýÀàÐÍÓ¦¸ÃÊÇ×Ö·û´®Ð͵ġ£
²Î¿¼ PHP ÊÖ²á¶Ô echo µÄ˵Ã÷£º
Óï·¨£ºecho(strings);
²ÎÊý strings ±ØÐè¡£
ÃèÊö£ºÒ»¸ö»ò¶à¸öÒª·¢Ë͵½Êä³öµÄ×Ö·û´®¡£
С֪ʶ1£º×¢Òâ echo ºÍ print º¯ÊýµÄÇø±ð£¬±ÈÈ磺
echo "123" . print("abc"); //Óï·¨ÕýÈ·£¬µ«Êä³ö²»ÊÇ123abc£¬¶øÊÇ abc1231
&nb
Ïà¹ØÎĵµ£º
1¡¢Ê¹Óõ¥ÒýºÅÀ¨ÆðÀ´µÄ×Ö·û´®
µ±Ê¹ÓÃË«ÒýºÅÀ´À¨×Ö·û´®Ê±£¬PHP½âÊÍÆ÷»á¶ÔÆä½øÐбäÁ¿Ìæ»»¡¢×ªÒåµÈ²Ù×÷£¬Èç
“\n”¡£Èç¹ûÖ»ÏëÊä³öÒ»¸ö»ù±¾µÄ×Ö·û´®£¬Óõ¥ÒýºÅ»á½ÚʡһЩ×ÊÔ´¡£µ±È»£¬Èç¹ûÐèÒª½øÐбäÁ¿Ìæ»»µÄ£¬ÄǾͱØÐëÓÃË«ÒýºÅÁË¡£
2¡¢×Ö·û´®µÄÊä³ö
ÒÔÏÂÄÄÒ»ÌõÓï¾äµÄÔËÐÐËÙ¶È×î¿ì£¿
print “Hi my name is ......
ÆäʵÕâ¸öµÄÖ÷Òª²¿·Ö²¢²»ÊÇÒ»¸öjquery£¬µ«ÊDZØÐëʹÓõ½
php³ÌÐò²¿·Ö£¬Ò²Ö»ÐèÒªÕâ¸öÒ»¸öphp³ÌÐò¾Í¿ÉÒÔÁË
www.corange.cnÇײâ
<?php
header("Content-Type: text/html; charset=utf-8");
@header( "Cache-Control: no-cache, must-revalidate" );
@header( "Pragma: no-cache" );
@header( "Last-Modified: " ......
ÔÚÍùPHP SessionÀïÃæ±£´æÐÅϢ֮ǰ£¬ÐèÒªÊ×ÏÈʹÓÃsession_start()º¯ÊýÀ´Æô¶¯session,
Õâ¸öº¯Êý±ØÐëÔÚ<html>±êǩ֮ǰµ÷ÓᣴúÂëÈçÏ£º
<?php session_start(); ?>
<html>
<body>
</body>
</html>
ÔÚSessionÆô¶¯ÒԺ󣬿ÉÒÔʹÓÃPHP $_SESSION±äÁ¿À´»ñÈ¡ºÍÉèÖÃsession±äÁ¿£¬ÊµÀý´ú ......