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

PHP»ñÈ¡ºº×ÖÆ´ÒôÊ××Öĸ

<FORM METHOD=POST ACTION="#">
<INPUT TYPE="text" NAME="name">
<INPUT TYPE="submit" value="query" name="sub">
</FORM>
<?php
function getinitial($str)
{
$asc=ord(substr($str,0,1)); //ord()»ñÈ¡ASCII
if ($asc<160) //·ÇÖÐÎÄ
{
if ($asc>=48 && $asc<=57){
return '1'; //Êý×Ö
}elseif ($asc>=65 && $asc<=90){
return chr($asc); // A--Z chr½«ASCIIת»»Îª×Ö·û
}elseif ($asc>=97 && $asc<=122){
return chr($asc-32); // a--z
}else{
return '~'; //ÆäËû
}
}
else //ÖÐÎÄ
{
$asc=$asc*1000+ord(substr($str,1,1));
//»ñÈ¡Æ´ÒôÊ××ÖĸA--Z
if ($asc>=176161 && $asc<176197){
return 'A';
}elseif ($asc>=176197 && $asc<178193){
return 'B';
}elseif ($asc>=178193 && $asc<180238){
return 'C';
}elseif ($asc>=180238 && $asc<182234){
return 'D';
}elseif ($asc>=182234 && $asc<183162){
return 'E';
}elseif ($asc>=183162 && $asc<184193){
return 'F';
}elseif ($asc>=184193 && $asc<185254){
return 'G';
}elseif ($asc>=185254 && $asc<187247){
return 'H';
}elseif ($asc>=187247 && $asc<191166){
return 'J';
}elseif ($asc>=191166 && $asc<192172){
return 'K';
}elseif ($asc>=192172 && $asc<194232){
return 'L';
}elseif ($asc>=194232 && $asc<196195){
return 'M';
}elseif ($asc>=196195 && $asc<197182){
return 'N';
}elseif ($asc>=197182 && $asc<197190){
return 'O';
}elseif ($asc>=197190 &&


Ïà¹ØÎĵµ£º

phpÅäÖÃÎļþphp.ini ÖÐÎÄ°æ

ת×Ô:http://www.ccvita.com
;;;;;;;;;;;;;;
;; ¼ò½é ;;
;;;;;;;;;;;;;;
; ±¾ÎIJ¢·ÇÊǶÔÓ¢ÎÄ°æ php.ini µÄ¼òµ¥·­Ò룬¶øÊDzο¼ÁËÖÚ¶à×ÊÁÏÒԺ󣬽áºÏ×Ô¼ºµÄÀí½â£¬Ôö¼ÓÁËÐí¶àÄÚÈÝ£¬
; °üÀ¨ÔÚÔ­ÓÐ php.ini »ù´¡ÉÏÔö¼ÓÁËһЩʵÓÃÄ£¿éµÄÅäÖÃ˵Ã÷£¬Í¬Ê±¶ÔÎļþÄÚÈݵİ²ÅŽøÐÐÁ˵÷Õû¡£
; ÓÉÓÚ×÷Õß²»Ï²»¶ no-free µÄÍæÒâ¶ù£ ......

php socket ä¯ÀÀÆ÷

<?PHP
/**
* patServer
* PHP socket server base class
* Events that can be handled:
*   * onStart
*   * onConnect
*   * onConnectionRefused
*   * onClose
*   * onShutdown
*   * onReceiveData
*
* @version 1.1
* @author &n ......

php°ËÈٰ˳Ü

ÒÔ¶¯ÊÖʵ¼ùΪÈÙ , ÒÔÖ»¿´²»Á·Îª³Ü;
ÒÔ´òÓ¡ÈÕ־ΪÈÙ , ÒÔµ¥²½¸ú×ÙΪ³Ü;
ÒÔ¿Õ¸ñËõ½øΪÈÙ , ÒÔÖƱíËõ½øΪ³Ü;
ÒÔµ¥Ôª²âÊÔΪÈÙ , ÒÔÈ˹¤²âÊÔΪ³Ü;
ÒÔÄ£¿é¸´ÓÃΪÈÙ , ÒÔ¸´ÖÆÕ³ÌùΪ³Ü;
ÒÔ¶à̬ӦÓÃΪÈÙ , ÒÔ·ÖÖ§ÅжÏΪ³Ü;
ÒÔPythonicΪÈÙ , ÒÔÈßÓàÍÏí³Îª³Ü;
ÒÔ×ܽá·ÖÏíΪÈÙ , ÒÔ¹òÇóÆä½âΪ³Ü; ......

php+mysql±àÂëÎÊÌâ×ܽá

Òª²»³öÏÖÂÒÂ룬¾ÍÒª±£³ÖÊý¾Ý¿âºÍÒ³ÃæµÄ±àÂë¸ñʽһÖÂ.ÎÒÈ«²¿Ê¹ÓÃutf-8µÄ±àÂë.
Ê×ÏÈÒ³Ãæ:
 1. ½«ÎļþÓÃUE´ò¿ª,½«ÎļþÁí´æΪUTF-8ÎÞBOM¸ñʽ.ºÜ¶à±à¼­Æ÷¶¼¿ÉÓÃ.
 2.ʹÓà header("content-type:text/html;¡¡charset=utf-8"); Ç¿ÖÆת»»³Éutf-8µÄ±àÂë.
   Ò²¿ÉÒÔн¨Ò»¸öhead.php,ÈçÏÂ,ÔÚÒ³ÃæÖÐÓÃinclude( ......

phpÔÚIIsÉϵÄÅäÖð²×°

ÒÔǰֻŪ¹ýasp£¬×î½üÓеãÐËȤÀ´Ñ§ÏÂphp£¬·¢ÏÖphp±Èasp²»ÊÇÒ»°ãµÄ¹¦ÄÜÇ¿´ó¡£
¸Õ¿ªÊ¼ÍµÁËÏÂÀÁ£¬Ã»ÓÐÈ¥php¹ÙÍø¿´°ïÖú£¬Ó¢ÎĵÄËäÈ»¿´ÆðÀ´²»ÄÑ£¬µ«ÊÇ»¹ÊÇÏ°¹ß¿´ÖÐÎÄ£¬ÓÚÊÇËÑË÷Á˼¸ÆªÓйØphpÔÚiisÉÏ°²×°µÄÎÄÕ£¬°´ÕÕÕâЩÎÄÕÂÉϵÄ˵Ã÷¿ªÊ¼ÅäÖÃphp¡£ÎҾͶ¥Ëü¸ö·Î£¬ÅäÖÃÆðÀ´ÎÊÌâǧÆæ°Ù¹Ö£¬ÕÛÌÚÁËÁ½Ì죬ҲÓôÃÆÁËÁ½Ìì¡£
µÃ£¬Ë÷ÐÔ¿´¹Ù ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ