资源描述:
《初级程序员PHP面试题.doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、phpÃæÊÔÌâ¼°´ð°¸(Ô´´)Êղػù´¡Ìâ:1.±íµ¥ÖÐgetÓëpostÌá½»·½·¨µÄÇø±ð?´ð:getÊÇ·¢ËÍÇëÇóHTTPÐÒéͨ¹ýurl²ÎÊý´«µÝ½øÐнÓÊÕ,¶øpostÊÇʵÌåÊý¾Ý,¿ÉÒÔͨ¹ý±íµ¥Ìá½»´óÁ¿ÐÅÏ¢.2.sessionÓëcookieµÄÇø±ð?´ð:session:´¢´æÓû§·ÃÎʵÄÈ«¾ÖΨһ±äÁ¿,´æ´¢ÔÚ·þÎñÆ÷ÉϵÄphpÖ¸¶¨µÄĿ¼Öеģ¨session_dir£©µÄλÖý
2、øÐеĴæ·Åcookie:ÓÃÀ´´æ´¢Á¬ÐøÔL†–Ò»¸öí“ÃæʱËùʹÓã¬ÊÇ´æ´¢ÔÚ¿Í»§¶Ë£¬¶ÔÓÚCookieÀ´ËµÊÇ´æ´¢ÔÚÓû§WINµÄTempĿ¼Öеġ£Á½Õ߶¼¿Éͨ¹ýʱ¼äÀ´ÉèÖÃʱ¼ä³¤¶Ì3.Êý¾Ý¿âÖеÄÊÂÎñÊÇʲô?´ð:ÊÂÎñ£¨transaction£©ÊÇ×÷Ϊһ¸öµ¥ÔªµÄÒ»×éÓÐÐòµÄÊý¾Ý¿â²Ù×÷¡£Èç¹û×éÖеÄËùÓвÙ×÷¶¼³É¹¦£¬ÔòÈÏΪÊÂÎñ³É¹¦£¬¼´Ê
3、¹Ö»ÓÐÒ»¸ö²Ù×÷ʧ°Ü£¬ÊÂÎñÒ²²»³É¹¦¡£Èç¹ûËùÓвÙ×÷Íê³É£¬ÊÂÎñÔòÌá½»£¬ÆäÐ޸Ľ«×÷ÓÃÓÚËùÓÐÆäËûÊý¾Ý¿â½ø³Ì¡£Èç¹ûÒ»¸ö²Ù×÷ʧ°Ü£¬ÔòÊÂÎñ½«»Ø¹ö£¬¸ÃÊÂÎñËùÓвÙ×÷µÄÓ°Ï춼½«È¡Ïû¡£¼òÊöÌâ:1¡¢ÓÃPHP´òÓ¡³öÇ°Ò»ÌìµÄʱ¼ä¸ñʽÊÇ2006-5-1022:21:21(2·Ö)´ð:echodate('Y-m-dH:i:s',strtotime('-1days'));2¡¢
4、echo(),print(),print_r()µÄÇø±ð(3·Ö)´ð:echoÊÇPHPÓï¾ä,printºÍprint_rÊǺ¯Êý,Óï¾äûÓзµ»ØÖµ,º¯Êý¿ÉÒÔÓзµ»ØÖµ(¼´±ãûÓÐÓÃ)print£¨£©Ö»ÄÜ´òÓ¡³ö¼òµ¥ÀàÐͱäÁ¿µÄÖµ(Èçint,string)print_r£¨£©¿ÉÒÔ´òÓ¡³ö¸´ÔÓÀàÐͱäÁ¿µÄÖµ(ÈçÊý×é,¶ÔÏó)echoÊä³öÒ»¸ö»òÕ߶à¸ö×Ö·û´®3¡¢Äܹ»Ê¹HTMLºÍPHP·ÖÀ뿪ʹÓÃ
5、µÄÄ£°å(1·Ö)´ð:Smarty,Dwoo,TinyButStrong,TemplateLite,Savant,phemplate,XTemplate5¡¢Ê¹ÓÃÄÄЩ¹¤¾ß½øÐа汾¿ØÖÆ?(1·Ö)´ð:cvs,svn,vss;6¡¢ÈçºÎʵÏÖ×Ö·û´®·×ª?(3·Ö)´ð:echostrrev($a);7¡¢ÓÅ»¯MYSQLÊý¾Ý¿âµÄ·½·¨¡£(4·Ö£¬¶àд¶àµÃ)´ð:1¡¢Ñ¡È¡×îÊÊÓõÄ×Ö¶ÎÊôÐÔ,¾¡¿ÉÄܼõÉÙ¶¨Òå×ֶ㤶È,¾¡Á¿°Ñ×
6、Ö¶ÎÉèÖÃNOTNULL,ÀýÈç'Ê¡·Ý,ÐÔ±ð',×îºÃÉèÖÃΪENUM2¡¢Ê¹ÓÃÁ¬½Ó£¨JOIN£©À´´úÌæ×Ó²éѯ:a.ɾ³ýûÓÐÈκζ©µ¥¿Í»§:DELETEFROMcustomerinfoWHEREcustomeridNOTin(SELECTcustomeridFROMorderinfo)b.ÌáÈ¡ËùÓÐûÓж©µ¥¿Í»§:SELECTFROMcustomerinfoWHEREcustomeridNOTin(SELECTcustomeridFROMorderinfo)
7、c.Ìá¸ßbµÄËÙ¶ÈÓÅ»¯:SELECTFROMcustomerinfoLEFTJOINorderidcustomerinfo.customerid=orderinfo.customeridWHEREorderinfo.customeridISNULL3¡¢Ê¹ÓÃÁªºÏ(UNION)À´´úÌæÊÖ¶¯´´½¨µÄÁÙʱ±ía.´´½¨ÁÙʱ±í:SELECTnameFROM`nametest`UNIONSELECTusernameFROM`nametest2`4¡¢ÊÂÎñ´¦Àí:a.±£Ö¤Êý¾ÝÍêÕûÐÔ
8、,ÀýÈçÌí¼ÓºÍÐÞ¸Äͬʱ,Á½Õß³ÉÁ¢Ôò¶¼Ö´ÐÐ,Ò»Õßʧ°Ü¶¼Ê§°Ümysql_query("BEGIN");mysql_query("INSERTINTOcustomerinfo(name)VALU