ÀûÓÃGoogleAppÍйÜ×Ô¼ºµÄPHP´úÂ루Eclipse¿ª·¢»·¾³£©
Google ÔÚÒ»ÄêÇ°·¢²¼ÁËGoogle App Engine (GAE) ¡£ÕâÊÇÒ»¸öÃâ·ÑµÄ App Engine Ö÷»ú£¬¿ÉÒÔÈÃÄãµÄÿ¸öApplication£¨Ãâ·ÑµÄ×î¶àÓÐ10¸ö£©ÓÐ1GBµÄ´ÅÅÌ¿Õ¼äºÍ43.6¸öCPUСʱÓë10GBµÄÉÏ´«ºÍ10GBµÄÏÂÔØ´ø¿í£¬ÒÔ¼°2000¸öµç×ÓÓʼþ¡£Èç¹ûÄãÐèÒªµØ¸ü¶à£¬ÄǾÍÊǸ¶Ç®ÁË¡£
GAE ×î½ü·¢²¼ÁËÕýʽ֧³ÖJavaµÄ֪ͨ¡£ÓÚÊÇ£¬»¥ÁªÍøÉÏ¿ªÊ¼ÓÐÁ˸÷ÖÖ¸÷ÑùµÄBLOGÆÀÂÛÎÄÕ£¬»¹ÓÐһЩÈ˾ÓÈ»ÔÚGoogle App Engine ÖÐÔËÐÐPHP³ÌÐò£¬Õâ¸öÌ«²»¿É˼ÒéÁË¡£ÒòΪGAEÄ¿Ç°²¢²»Ö§³ÖPHP¡£
Æäʵ£¬ËûÃÇʹÓÃÁËÒ»¸ö½Ð×ö QuercusµÄ¶«¶«£¬ Quercus ±¾ÖÊÉÏÊÇÒ»¸ö 100% µÄÓÃJava ʵÏÖµÄÒ»¸ö PHP ÒýÇæ (ÐèÒª JDK 1.5)£¬ËùÒÔ£¬Ö»ÒªÄã°ÑQuercus¼¯³Éµ½ÄãµÄGAEÖУ¬Äã×ÔȻҲ¿ÉÒÔÔËÐÐPHP½Å±¾ÁË¡£
ÏÂÃæÊÇ´óÌå²½Ö裺
1¡¢ עɾһ¸ö Ãâ·ÑµÄÕʺš£½ÓÊÕÑéÖ¤Âë¶ÌÐÅ£¬¿ÉÄÜÐèÒªµÈ´ýºÃ¼¸·ÖÖÓ£¬²»Òª×ż±¡£
2¡¢ÏÂÔØÕâ¸öÎļþ µ½Äã±¾»ú¡£
3¡¢ÔÚ war\WEB-INF\appengine-web.xml ±à¼Ó¦ÓõÄXML tag£¬°ÑÆäÃû×ָijÉÄãËù×¢²áµÄÃû×Ö¡£ÀýÈ磺
<application>where23</application>
4¡¢×îºó£¬ÉÏ´«ÄãµÄÓ¦Óᣣ¨ÐèÒª°²×°JDKºÍappengine-java-sdk£©¡£
d:\appengine-java-sdk\bin\appcfg.cmd update c:\phpwithjava\war\
5¡¢Ê¹ÓÃEclipse¿ª·¢
5.1¡¢ °²×°Eclipse Google ²å¼þ£º
http://dl.google.com/eclipse/plugin/3.4£¨¸ù¾Ý×Ô¼ºµÄEclipse°æ±¾¶ø¶¨£¬ÎÒµÄÊÇ3.5£©
5.2¡¢ÔÚEclipseÖÐн¨“web application project”ºó½«“phpwithjava.rar”½âѹºóµÄÁ½¸öÎļþ¼Ð“src”ºÍ“war”Ìæ»»Eclispe×Ô¶¯Éú³ÉµÄ“src”ºÍ“war”¡£
5.3¡¢¿ª·¢Íê³Éºó£¬µã»÷EclipseÖеēDeploy App Engine Project”°´Å¥ÉÏ´«¹¤³Ìµ½Ö¸¶¨µÄapplication-id¡£
Ïà¹ØÎĵµ£º
¹ØÓÚJQuery ²å¼þGridµÄѧϰʹÓÃ±Ê¼Ç (PHP°æ)
ÔÚ¿ª·¢WEBÓ¦ÓóÌÐòʱ£¬ÎÒÃǻᾳ£ºÍÊý¾Ý´ò½»µÀ£¬¶øÊý¾Ýͨ³£¶¼ÊÇͨ¹ý±í¸ñµÄÐÎʽÀ´½øÐÐÏÔʾ¡£¶øÔÚjQueryÖУ¬ÓÐÒ»¸öGrid²å¼þ£¬
ËüÔÚ´¦ÀíÊý¾Ýʱ¹¦ÄÜÒì³£µÄÇ¿´ó£¬Äܼ¸ºõÂú×ãÎÒÃǵÄËùÓÐÐèÇ󡣿ÉνÎ޵С£×ÁÄ¥ÁËGridºÃ¼¸Ì죬ÖÕÓÚÔÚÍøÉÏÕÒµ½ÁËÒ»¸ö·Ç³£°ôµÄÑ§Ï ......
10¿î»ùÓÚPHPµÄÃâ·ÑCMS£¬ÏëҪͨ¹ýPHP+MYSQL´î½¨ÍøÕ¾µÄÅóÓÑ¿ÉÒÔ´ÓÖвο¼¡£
1. Joomla!
Joomla! µÄÇ°ÉíÊÇMamboµÄ¿ªÔ´Âë¼Æ»®£¬
2. Drupal
Ö±±ÆJoomla!µÄ¿ªÔ´CMS£¬²»¹ýòËÆÓû§Èº»¹ÊÇûÓÐJoomla!¶à¡£
3. Mambo
ÆóÒµÀàCMSÍøÕ¾¿ÉÒÔÑ¡Ôñ£¬¸öÈË»¹ÊÇÓÃJoomla ºÃÁË¡£
4. DEDECMS
ÕâËã¹úÄÚ×îÖªÃû¡¢Ê¹ÓÃÈËÊý×î¶àµÄCMSÁË°É¡£ÎÞÊýÀ ......
ÔÚPHPÖУ¬ÎļþÉÏ´«Ò»°ãÊÇͨ¹ýmove_uploaded_file£¨£©À´ÊµÏֵġ£
bool move_uploaded_file ( string filename, string destination )±¾º¯Êý¼ì²é²¢È·±£ÓÉ filename Ö¸¶¨µÄÎļþÊǺϷ¨µÄÉÏ´«Îļþ£¨¼´Í¨¹ý PHP µÄ HTTP POST ÉÏ´«»úÖÆËùÉÏ´«µÄ£©¡£Èç¹ûÎļþºÏ·¨£¬Ôò½«ÆäÒƶ¯ÎªÓÉ destination Ö¸¶¨µÄÎļþ¡£
Èç¹û filename ²»ÊǺϷ ......
Ö÷ҪʹÓÃÁË int substr_count ( string haystack, string needle [, int offset [, int length]] ) Õâ¸ö·½·¨,Õâ¸ö·½·¨±éÀú´ý²âµÄ×Ö·û´®$strÖÐÓÐûÓÐ$allergicWordÊý×éÖÐËù°üº¬µÄÃô¸Ð´Ê£º
$allergicWord = array('Ôà»°','ÂîÈË»°');
$str = 'Õâ ......