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

php»ñÈ¡¿Í»§¶Ë²Ù×÷ϵͳÐÅÏ¢£¨ÀàÎļþ£©

<?php
class ClientGetObj{
function getOS(){
global $_SERVER;
$agent=$_SERVER["HTTP_USER_AGENT"];
$os=false;
if(eregi("win",$agent)&&strpos($agent,"95")){
$os="Windows 95";
}else if(eregi("win 9x",$agent)&&strpos($agent,"4.90")){
$os="Windows ME";
}else if(eregi("win",$agent)&&eregi('98',$agent)){
$os="Windows 98";
}else if(eregi("win",$agent)&&eregi('nt 5.1',$agent)){
$os="Windows XP";
}else if(eregi("win",$agent)&&eregi('nt 5',$agent)){
$os="Windows 2000";
}else if(eregi("win",$agent)&&eregi('nt',$agent)){
$os="Windows NT";
}else if(eregi("win",$agent)&&eregi('32',$agent)){
$os="Windows 32";
}else if(eregi("linux",$agent)){
$os="Linux";
}else if(eregi("unix",$agent)){
$os="Unix";
}else if(eregi("sun",$agent)&&eregi("os",$agent)){
$os="SunOS";
}else if(eregi("ibm",$agent)&&eregi("os",$agent)){
$os="IBM OS/2";
}else if(eregi("mac",$agent)&&eregi("pc",$agent)){
$os="Macintosh";
}else if(eregi("powerpc",$agent)){
$os="PowerPC";
}else if(eregi("aix",$agent)){
$os="AIX";
}else if(eregi("HPUX",$agent)){
$os="HPUX";
}else if(eregi("netbsd",$agent)){
$os="NetBSD";
}else if(eregi("bsd",$agent)){
$os="BSD";
}else if(eregi("OSF1",$agent)){
$os="OSF1";
}else if(eregi("IRIX",$agent)){
$os="IRIX";
}else if(eregi("FreeBSD",$agent)){
$os="FreeBSD";
}else if(eregi("teleport",$agent)){
$os="teleport";
}else if(eregi("flashget",$agent)){
$os="flashget";
}else if(eregi("webzip",$agent)){
$os="webzip";
}else if(eregi("offline",$agent)){
$os="offline";
}else{
$os="Unknown";
}
return $os;
}
}
/*²âÊÔ£º
$myos=new ClientGetObj;
$result=$myos->getOS();
echo "¿Í»§¶Ë²Ù×÷ϵͳΪ£º".$result;
*/
?>


Ïà¹ØÎĵµ£º

ÅäÖÃeclipseµÄphp¿ª·¢²å¼þ

ÏÈÏÂÔØ²¢°²×°eclipse£¬ÏÂÔØµØÖ·£ºhttp://download.Eclipse.org/downloads/index.php¡£Eclipse ÐèÒª jre µÄÖ§³Ö£¬ËùÒÔÈç¹û»úÆ÷ÉÏ»¹Ã»×°jreµÄ»°¾Í¸Ï¿ìÈ¥ÏÂÔØÒ»¸ö×°ÉÏ£¬http://java.sun.comÓÐjreµÄÏÂÔØ¡£
µÚ¶þ£¬ÏÂÔØ²¢°²×° PHP ÔÚ Eclipse µÄ²å¼þ
µØÖ·£ºhttp://sourceforge.net/project/showfiles.php?group_id=57621&pa ......

phpºÍjavascriptͨѶ

°ÑphpÊý¾Ý»òÖµ´«µÝ¸øjs
£ººÜ¼òµ¥£¬Ö±½ÓÔÚjsÖÐʹÓÃphp´úÂ룬»ì±à¼´¿É¡£
°ÑjsÊý¾Ý´«µÝ¸øphp
£º¿ÉÒÔʹÓôò¿ªÐ´°¿ÚµÄ·½Ê½£¬Í¨¹ýurlµØÖ·°ÑÊý¾Ý´«µÝ¹ýÈ¥¡£Ò²¿ÉÒÔʹÓÃajax£¬Í¨¹ýget»òpost´«µÝ¸øphp£¬Ò²¿ÉÒÔ±£´æcookieÈÃphpÀ´¶Á¡£
ÔÚ´«µÝÊý¾Ý¹ý³ÌÖпÉÄÜÓöµ½ÖÐÎıàÂë
ÎÊÌ⣬¿ÉÒÔͳһ±àÂ뷽ʽΪjsµÄescape£¬unescape£¬Ò²¿ÉÒÔÍ³Ò ......

ÐÂÀËPHP¹¤³Ìʦ±ÊÊÔÌâ

1. дһ¸öº¯Êý£¬¾¡¿ÉÄܸßЧµÄ£¬´ÓÒ»¸ö±ê×¼ url
ÀïÈ¡³öÎļþµÄÀ©Õ¹Ãû
   ÀýÈç: http://www.sina.com.cn/abc/de/fg.php
?id=1
ÐèҪȡ³ö php »ò .php
2. ÔÚ HTML ÓïÑÔÖУ¬Ò³ÃæÍ·²¿µÄ meta ±ê¼Ç¿ÉÒÔÓÃÀ´Êä³öÎļþµÄ±àÂë
¸ñʽ£¬ÒÔÏÂÊÇÒ»¸ö±ê×¼µÄ meta Óï¾ä
   <META http-equiv='Content-Type
' ......

38ÌõPHP±àÂëÓÅ»¯¼ÓËÙ¼¼ÇÉ

1. ¾¡Á¿²ÉÓôóÁ¿µÄPHPÄÚÖú¯Êý¡£
2. echo ±È print ¿ì¡£
3. ²»Òª°Ñ·½·¨Ï¸·ÖµÃ¹ý¶à£¬×ÐϸÏëÏëÄãÕæÕý´òËãÖØÓõÄÊÇÄÄЩ´úÂ룿
4. ÔÚÖ´ÐÐforÑ­»·Ö®Ç°È·¶¨×î´óÑ­»·Êý£¬²»ÒªÃ¿Ñ­»·Ò»´Î¶¼¼ÆËã×î´óÖµ¡£
5. ×¢ÏúÄÇЩ²»ÓõıäÁ¿ÓÈÆäÊÇ´óÊý×飬ÒÔ±ãÊÍ·ÅÄÚ´æ¡£
6. ²¢·ÇÒªÓÃÀàʵÏÖËùÓеÄÊý¾Ý½á¹¹£¬Êý×éÒ²ºÜÓÐÓá£
7. $row['id']µÄÐ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ