PHPµÄMVCʵÏÖ
¸ÕѧPHPµÄMVC,ÍøÉÏÕÒÀ´µãÎÄÕÂѧϰ,·ÖÏíÏÂ
ASP£¬JSP£¬PHPÊÇWEB¿ª·¢µÄÈý´ó¼¼Êõ£¬ÈýÖÖ¼¼ÊõÓÅȱµãÒ²Ôç¾ÍÓÐÈË·ÖÎö¹ýÁË¡£ÎÞ·ÇÒ²¾ÍÊÇASP¼òµ¥Ò×ÓÃÇÒÓÐmicrosoft×ö¿¿É½£¬JSP¹¦ÄÜÇ¿´óÊÇÒòΪÓÐjavaÖ§³Ö£¬PHPÔò¿ªÔ´¿çƽ̨¡£ÔÚ¹úÄÚ£¬ASPÓ¦Ó÷¶Î§×î¹ã£¬JSP·¢Õ¹ÊÆÍ·×îÃÍ£¬PHPÔò´¦ÓÚÁÓÊÆ¡£Õâ¿ÉÄÜÓ빫˾µÄÖ§³ÖÒÔ¼°¼¼ÊõµÄÅàѵÓйء£
ÓÉÓÚ¹«Ë¾ÏîÄ¿µÄÐèÒª£¬ÎÒÕâ²Å½Ó´¥PHP£¬ÓùýÒ»¶Îʱ¼äºóÁ½µãÌå»á×îÉî¿Ì£¬Ò»ÊÇѧϰÈÝÒ×£¬ÉÏÊÖ¼«¿ì£¬ÄÚÖú¯ÊýºÜ¶à£¬ÊʺϿìËÙ¿ª·¢£»¶þÊÇѧϰ×ÊÁÏØÑ·¦£¬ÆÕ¼°²»¹ã£¬ºÜ¶àʱºò¶¼ÒªÈ¥¿´Ó¢ÎÄÎĵµ¡£
¶ÔÓÚÖÐСÐÍWEBÓ¦ÓÃÀ´Ëµ£¬PHPÓкÜÇ¿µÄ¾ºÕùÁ¦£¬LINUX+APACHE+MYSQL+PHP(LAMP)µÄ×éºÏ¼¸ºõ¿ÉÒÔʤÈξø´ó¶àÊýÍøÕ¾µÄ½â¾ö·½°¸£¬¶ÔÓÚ´óÐÍÓ¦ÓÃÀ´½²£¬¶ÔÓÚϵͳ¼Ü¹¹ÒªÇó¸ü¸ß£¬ÐèÒªÓгÉÊìµÄ¿ò¼ÜÖ§³Ö£¬JSPµÄstrutsÊǸö²»´íµÄ¿ò¼Ü£¬¹úÄÚ½éÉÜËüµÄ×ÊÁÏÒ²·Ç³£¶à£¬Ó¦ÓÃÖ𽥹㷺ÆðÀ´,¶ÔÓ¦µÄPHPÒ²ÓÐphp.MVC£¬µ«ÊÇÎÒËѱéÁËÍøÂçҲûÓз¢ÏÖһƪÖÐÎÄÎĵµ£¬Õâ²ÅÈÃÎÒ¶¯ÁË·ÒëÓû§Ö¸ÄÏÄîÍ·£¬Ò²ËãÊÇÅ×שÒýÓñ£¬Ï£ÍûPHPÄܹ»ÔÚ¹úÄÚÅ·¢Õ¹ÆðÀ´¡£
Ò§½ðµãÆÀ:
ÒÔÉÏÊÇһƪÎÄÕÂ˵µ½µÄ,ÓеãµÀÀí,µ«ËƺõÎÄÕÂÊÇÓеãÄê´ú¾ÃÔ¶ÁË!Ä¿Ç°ÏÖʵPHP´óΪºÃת!ÊÆÍ·Ò²ÃÍ!ÎÒ¿´ÐÐ...
----
¡¡¡¡MVCģʽÔÚÍøÕ¾¼Ü¹¹ÖÐÊ®·Ö³£¼û¡£ËüÔÊÐíÎÒÃǽ¨Á¢Ò»¸öÈý²ã½á¹¹µÄÓ¦ÓóÌʽ£¬´Ó´úÂëÖзÖÀë³öÓÐÓõIJ㣬°ïÖúÉè¼ÆʦºÍ¿ª·¢ÕßÐͬ¹¤×÷ÒÔ¼°Ìá¸ßÎÒÃÇά»¤ºÍÀ©Õ¹¼ÈÓгÌʽµÄÄÜÁ¦¡£
¡¡¡¡ÊÓͼ£¨View£©
“ÊÓͼ”Ö÷ÒªÖ¸ÎÒÃÇË͵½Webä¯ÀÀÆ÷µÄ×îÖÕ½á¹û??±ÈÈçÎÒÃǵĽű¾Éú³ÉµÄHTML¡£µ±Ëµµ½ÊÓͼʱ£¬ºÜ¶àÈËÏëµ½µÄÊÇÄ£°æ£¬µ«ÊÇ°ÑÄ£°å·½°¸½Ð×öÊÓͼµÄÕýÈ·ÐÔÊÇÖµµÃ»³Òɵġ£
¶ÔÊÓͼÀ´Ëµ£¬×îÖØÒªµÄÊÂÇé¿ÉÄÜÊÇËüÓ¦¸ÃÊÇ“×ÔÎÒÒâʶ£¨self aware£©”µÄ£¬ÊÓͼ±»äÖȾ£¨render£©Ê±£¬ÊÓͼµÄÔªËØÄÜÒâʶµ½×Ô¼ºÔÚ¸ü´ó¿ò¼ÜÖеĽÇÉ«¡£
ÒÔXMLΪÀý£¬¿ÉÒÔ˵XMLÔÚ±»½âÎöʱ£¬DOM APIÓÐ×ÅÕâÑùµÄÈÏÖª??Ò»¸öDOMÊ÷ÀïµÄ½ÚµãÖªµÀËüÔÚÄÄÀïºÍËü°üº¬ÁËʲô¡£ £¨µ±Ò»¸öXMLÎĵµÖеĽڵãÓÃSAX½âÎöʱֻÓе±½âÎöµ½¸Ã½ÚµãʱËü²ÅÓÐÒâÒå¡££©
¾ø´ó¶àÊýÄ£°å·½°¸Ê¹Óüòµ¥µÄ¹ý³ÌÓïÑÔºÍÕâÑùµÄÄ£°å±êÇ©£º
ÒÔÏÂÊÇ´úÂëƬ¶Î£º
<p>{some_text}</p>
<p>{some_more_text}</p>
ËüÃÇÔÚÎĵµÖÐûÓÐÒâÒ壬ËüÃÇ´ú±íµÄÒâÒåÖ»ÊÇPHP½«ÓÃÆäËûµÄ¶«Î÷À´Ìæ»»Ëü¡£
Èç¹ûÄãͬÒâÕ
Ïà¹ØÎĵµ£º
php sessionÅäÖÃ
2009-12-02 09:58
[Session]
; ³ý·ÇʹÓÃsession_register()»ò$_SESSION×¢²áÁËÒ»¸ö±äÁ¿¡£
; ·ñÔò²»¹ÜÊÇ·ñʹÓÃÁËsession_start()£¬¶¼²»»á×Ô¶¯Ìí¼ÓÈκÎsession¼Ç¼¡£
; °üÀ¨resource±äÁ¿»òÓÐÑ»·ÒýÓõĶÔÏó°üº¬Ö¸Ïò×ÔÉíµÄÒýÓõĶÔÏ󣬲»Äܱ£´æÔڻỰÖС£
; register_globalsÖ¸Áî»á ......
php½Ì³Ì:·ÃÎÊPHPÀàÖгÉÔ±±äÁ¿»ò·½·¨
ÔÚ·ÃÎÊPHPÀàÖеijÉÔ±±äÁ¿»ò·½·¨Ê±£¬Èç¹û±»ÒýÓõıäÁ¿»òÕß·½·¨±»ÉùÃ÷³Éconst»òÕßstatic,ÄÇô¾Í±ØÐëʹÓòÙ×÷·û::,
·´Ö®Èç¹û±»ÒýÓõıäÁ¿»òÕß·½·¨Ã»Óб»ÉùÃ÷³Éconst»òÕßstatic,ÄÇô¾Í±ØÐëʹÓòÙ×÷·û->¡£
ÁíÍ⣬Èç¹û´ÓÀàµÄÄÚ²¿·ÃÎÊconst»òÕßstatic±äÁ¿»òÕß·½·¨,ÄÇô¾Í±ØÐëʹÓÃ×ÔÒýÓõ ......
ÏÖÔÚÖ÷Á÷µÄÍøÕ¾¿ª·¢ÓïÑÔÎÞÍâºõasp¡¢php¡¢asp.net¡¢jspµÈ¡£
ÍøÒ³´Ó¿ªÊ¼¼òµ¥µÄhmtlµ½¸´ÔӵķþÎñÓïÑÔ£¬×ß¹ýÁË10¶à¸öÄêÍ·£¬¸÷ÖÖ¼¼Êõ²ã³ö²»Çµ¥¸öµÄÖ÷Á÷¼¼ÊõÒ²ÔÚ²»¶Ï·Ðµİ汾£¬ÏÖÔÚ·ÖÎöϸ÷ÖÖÓïÑÔµÄÇø±ð¡¢ÓÅÊÆ¡¢ÁÓÊÆ¡¢¿ª·¢×¢ÒâÊÂÏ
HTML:µ±È»ÕâÊÇÍøÒ³×î»ù±¾µÄÓïÑÔ,ÿһ¸ö·þÎñÆ÷ÓïÑÔ¶¼ÐèÒªËüµÄÖ§³Ö,Ҫѧϰ,Õâ¸ö¿Ï¶¨ÊÇ¿ª ......
ÎÒÃǵĵ绰±¨ÃûϵͳÖУ¬ºô½ÐÖÐÐÄÊÕ¼¯ÁËÓû§µÄÒøÐÐÐÅÏ¢£¬È»ºóÇëÇóÒøÐеÄÖ§¸¶½Ó¿ÚµÄwebservice£¬ÐèÒª½øÐг¬Ê±ÉèÖã¬ÒòΪ²»ÄÜÒ»Ö±ÈÃѧԱµÈ´ý
½â¾ö·½·¨ÊÇ
1:Ê×ÏÈÏÈÒª¿´Ò»ÏÂphp.iniÀïµÄĬÈϳ¬Ê±Ê±¼ä£¬Ò»°ãÊÇ120Ãë
2£ºÔÚphp´úÂëÀï¼ÓÉÏ
ini_set('default_socket_timeout', 10);//ÉèÖó¬Ê±Ê±¼ä
ÈçÏÂͼ
......
ʹÓ÷½·¨£º
<?
Include “email.class”
$mail->setTo("a@a.com"); //ÊÕ¼þÈË
$mail-> setCC£¨"b@b.com,c@c.com"£©; //³ËÍ
$mail-> setCC£¨"d@b.com,e@c.com"£©; //ÃØÃܳËÍ
$mail->setfrom(“f@f.com”);//·¢¼þÈË
$mail->setSubject(“Ö÷Ìâ”) ; //Ö÷Ìâ
$ ......