Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

PHP ±à³ÌµÄ 5 ¸öÁ¼ºÃÏ°¹ß

2008 Äê 12 ÔÂ 29 ÈÕ
ÏñÆäËûÓïÑÔÒ»Ñù£¬¿ª·¢ÈËÔ±¿ÉÒÔÓà PHP ±àд³ö¸÷ÖÖÖÊÁ¿¼¶±ðµÄ´úÂ롣ѧϰÁ¼ºÃµÄ±à³ÌÏ°¹ßÄܹ»Ìá¸ß´úÂëÖÊÁ¿ºÍЧÂÊ¡£
¸ù¾Ý¾ßÌåµÄÇé¿ö£¬Ò»°ãµÄ¿ª·¢ÈËÔ±ÍùÍù±ÈÓÅÐãµÄ¿ª·¢ÈËÔ±µÄЧÂÊµÍ 10%~20%¡£ÓÅÐãµÄ¿ª·¢ÈËÔ±µÄЧÂʸü¸ß£¬ÒòΪËûÃÇÓµÓзḻµÄ¾­ÑéºÍÁ¼ºÃµÄ±à³ÌÏ°¹ß¡£²»Á¼µÄ±à³ÌÏ°¹ß½«»áÓ°Ï쵽ЧÂÊ¡£±¾ÎÄͨ¹ýչʾһЩÁ¼ºÃµÄ±à³ÌÏ°¹ß£¬°ïÖúÄú³ÉΪ¸üÓÅÐãµÄ³ÌÐòÔ±¡£
ÕâЩÁ¼ºÃµÄ±à³ÌÏ°¹ß²»½öÄÜÌá¸ßЧÂÊ£¬»¹ÄÜÈÃÄú±àд³öÔÚÓ¦ÓóÌÐòµÄÕû¸öÉúÃüÖÜÆÚÖÐÒ×ÓÚά»¤µÄ´úÂë¡£±àд³öÀ´µÄ´úÂë¿ÉÄÜÐèÒª´óÁ¿µÄά»¤£»Ó¦ÓóÌÐòµÄά»¤ÊÇÒ»±ÊºÜ´óµÄ¿ªÖ§¡£Ñø³ÉÁ¼ºÃµÄ±à³ÌÏ°¹ßÄܹ»Ìá¸ßÉè¼ÆÖÊÁ¿£¨±ÈÈçÄ£¿é»¯£©£¬´Ó¶øʹ´úÂë¸ü¼ÓÈÝÒ×Àí½â£¬Òò´Ëά»¤¾Í¸ü¼ÓÈÝÒ×£¬Í¬Ê±Ò²½µµÍά»¤³É±¾¡£
²»Á¼µÄ±à³ÌÏ°¹ß»áÔì³É´úÂëȱÏÝ£¬Ê¹ÆäÄÑÒÔά»¤ºÍÐ޸ģ¬²¢ÇҺܿÉÄÜÔÚÐÞ¸ÄʱÓÖÒýÈëÆäËûȱÏÝ¡£ÒÔÏÂÊÇ 5 ¸öÁ¼ºÃµÄ±à³ÌÏ°¹ß£¬Äܹ»°ïÖú PHP ´úÂë±ÜÃâÕâЩȱÏÝ£º
ʹÓÃÁ¼ºÃµÄÃüÃû¡£
·Ö³É¸üСµÄ²¿·Ö¡£
Ϊ´úÂëÌí¼Ó×¢ÊÍ¡£
´¦Àí´íÎóÌõ¼þ¡£
ÇмÉʹÓø´ÖÆÕ³Ìù¡£
ÏÂһС½Ú½«Ïêϸ½éÉÜÕâЩϰ¹ß¡£
ʹÓÃÁ¼ºÃµÄÃüÃû
ʹÓÃÁ¼ºÃµÄÃüÃûÊÇ×îÖØÒªµÄ±à³ÌÏ°¹ß£¬ÒòΪÃèÊöÐÔÇ¿µÄÃû³ÆÈôúÂë¸ü¼ÓÈÝÒ×ÔĶÁºÍÀí½â¡£´úÂëÊÇ·ñºÃÀí½âÈ¡¾öÓÚÊÇ·ñÄÜÔÚδÀ´Î¬»¤Ëü¡£¼´±ã´úÂë²»´øÓÐ×¢ÊÍ£¬Èç¹ûËüºÜÈÝÒ×Àí½â£¬½«´ó´ó·½±ãÈÕºóµÄ¸ü¸Ä¡£Õâ¸öÏ°¹ßµÄÄ¿±êÊÇÈÃÄú±àдµÄ´úÂëÏñÊé±¾Ò»ÑùÈÝÒ×ÔĶÁºÍÀí½â¡£
²»Á¼Ï°¹ß£ºº¬ºýµÄ»òÎÞÒâÒåµÄÃû³Æ
Çåµ¥ 1 ÖеĴúÂë°üº¬¹ý¶ÌµÄ±äÁ¿Ãû¡¢ÄÑÒÔ±æÈϵÄËõд´Ê£¬²¢ÇÒ·½·¨Ãû²»ÄÜ·´Ó³¸Ã·½·¨µÄ¹¦ÄÜ¡£Èç¹û·½·¨Ãû¸øÈ˵ĸоõÊÇËüÓ¦¸Ã×öÕâ¼þÊÂÇ飬¶øʵ¼ÊÖÐËüÈ´×öÁíÍâµÄÊÂÇ飬Õ⽫´øÀ´ÑÏÖصÄÎÊÌ⣬ÒòΪËü»áÎóµ¼ÈË¡£
Çåµ¥ 1. ²»Á¼Ï°¹ß£ºº¬ºýµÄ»òÎÞÒâÒåµÄÃû³Æ

<?php
function getNBDay($d)
{
switch($d) {
case 5:
case 6:
case 7:
return 1;
default:
return ($d + 1);
}
}
$day = 5;
$nextDay = getNBDay($day);
echo ("Next day is: " . $nextDay . "\n");
?>
Á¼ºÃÏ°¹ß£ºËµÃ÷ÐÔÇ¿²¢ÇÒ¼ò½àµÄÃû³Æ
Çåµ¥ 2 ÖеĴúÂëÌåÏÖÁËÁ¼ºÃµÄ±à³ÌÏ°¹ß¡£Ðµķ½·¨Ãû¾ßÓкÜÇ¿µÄ˵Ã÷ÐÔ£¬·´Ó³ÁË·½·¨µÄÓÃ;¡£Í¬Ñù£¬¸ü¸ÄºóµÄ±äÁ¿ÃûÒ²¸ü¾ß˵Ã÷ÐÔ¡£Î©Ò»µÄ±£³Ö×î¶ÌµÄ±äÁ¿ÊÇ $i£¬ÔÚ±¾Çåµ¥ÖУ¬ËüÊÇÒ»¸öÑ­»·±äÁ¿¡£¾¡¹ÜºÜ¶àÈ˲»ÔÞͬʹÓùý¶ÌµÄÃû³Æ£¬µ«ÔÚÑ­»·±äÁ¿ÖÐʹÓû¹ÊÇ¿ÉÒÔ½ÓÊܵģ¨ÉõÖÁÓкô¦£©£¬ÒòΪËüÃ÷È·±íÃ÷ÁË´úÂëµÄ¹¦ÄÜ¡£


Ïà¹ØÎĵµ£º

ѧϰPHP»¹ÊÇÓÎÏ·¿ª·¢£¿

¡¡¡¡ËµÊµÔڵģ¬ÏÖÔÚµÄweb¿ª·¢È·ÊµºÜ»ð£¬µ«×ܾõµÃ¶ÔÎÒÀ´ËµÃ»ÓÐʲôÎüÒýÁ¦¡£Ëµµ½µ×£¬²»¹ýÊÇ×ö¸öÍøÕ¾ÂÓÐʲôÒâ˼£¿¾ÍËã×ö¸öÌÔ±¦Íø£¬ËãºÜÅ£ÁË°É£¬ÄÇÓÖÔõôÑù£¬²»¹ý¾ÍÊÇʵÏÖһЩ½»»¥²Ù×÷µÄÍøÕ¾°ÕÁË£¬×ܾõµÃ£¬Ã»Óж¯Á¦¡£
¡¡¡¡Æäʵ£¬´ÓÄÚÐÄÉî´¦£¬»¹ÊǾõµÃ×öÓÎÏ·ºÜÓÐÒâ˼¡£ÍæÓÎÏ·¸üÓÐÒâ˼£¬×ö³öƯÁÁµÄÓÎϷЧ¹û²ÅÊǷdz£Ë§µÄ¡£¾¡¹ ......

Zend AMF+Flex+PHPµÄÒ»µãµãСÎÊÌâ

   ×òÌìÍíÉÏÒ»Ö±ÔÚ×ÁÄ¥Flex,Ïëͨ¹ýDataGrid°ÑMySQLÀïÃæµÄÊý¾Ý¸ø¶Á³öÀ´£¬ÆÚ¼ä³öÏÖÁ˼¸¸öСÎÊÌ⣬¼Ç¼ÏÂ~~
   1.µÚÒ»´Î½øÐÐÁ¬½ÓÊý¾Ý·þÎñ(Data-Connect to Data/Service-PHP-Browse)ʱ,»á³öÏÖ°²×°Zend FrameWork,Ñ¡Ôñok,²»ÒªÊºóÔÙÈ¥ÍøÕ¾ÏÂÔØZendAMF,Õâ¸öÀïÃæ»áÉÙһЩ¶«Î÷.
  2.Data-Bind to DataÊ ......

10ÌõPHP±à³ÌÏ°¹ßÖúÄãÕÒ¹¤×÷

1¡¢Ê¹Óõ¥ÒýºÅÀ¨ÆðÀ´µÄ×Ö·û´®
µ±Ê¹ÓÃË«ÒýºÅÀ´À¨×Ö·û´®Ê±£¬PHP½âÊÍÆ÷»á¶ÔÆä½øÐбäÁ¿Ìæ»»¡¢×ªÒåµÈ²Ù×÷£¬Èç
“\n”¡£Èç¹ûÖ»ÏëÊä³öÒ»¸ö»ù±¾µÄ×Ö·û´®£¬Óõ¥ÒýºÅ»á½ÚʡһЩ×ÊÔ´¡£µ±È»£¬Èç¹ûÐèÒª½øÐбäÁ¿Ìæ»»µÄ£¬ÄǾͱØÐëÓÃË«ÒýºÅÁË¡£
2¡¢×Ö·û´®µÄÊä³ö
ÒÔÏÂÄÄÒ»ÌõÓï¾äµÄÔËÐÐËÙ¶È×î¿ì£¿
print “Hi my name is ......

PHPÈçºÎÉèÖá¢È¡µÃ¡¢É¾³ýCookieÖµ£¿

PHPº¯Êýsetcookie()ÓÃÀ´ÉèÖÃcookie.
setcookie()º¯Êý±ØÐëÔÚ<html>±êǩ֮ǰµ÷Óã¬Óï·¨ÊÇsetcookie (name, value, expire,
path, domain) ÀýÈ磺
<?php
setcookie(”user”, “Alex
Porter”, time()+3600);
?>
<?php
setcookie(”url”, “http://www.mianwww. ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ