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

2010.05.06 PHP È¡µÃ¿Í»§¶ËÐÅÏ¢

<?php
/*
×÷ÓãºÈ¡µÃ¿Í»§¶ËÐÅÏ¢
²ÎÊý£º
·µ»Ø£ºÖ¸¶¨µÄ×ÊÁÏ
ʹÓãº
    $code = new clientGetObj;
    1¡¢ä¯ÀÀÆ÷£º$str = $code->getBrowse();
    2¡¢IPµØÖ·£º$str = $code->getIP();
    4¡¢²Ù×÷ϵͳ£º$str = $code->getOS();
*/
class clientGetObj
{
    function getBrowse()
    {
        global $_SERVER;
        $Agent = $_SERVER['HTTP_USER_AGENT'];
        $browser = '';
        $browserver = '';
        $Browser = array('Lynx', 'MOSAIC', 'AOL', 'Opera', 'JAVA', 'MacWeb', 'WebExplorer', 'OmniWeb');
        for($i = 0; $i <= 7; $i ++){
            if(strpos($Agent, $Browsers[$i])){
                $browser = $Browsers[$i];
                $browserver = '';
            }
        }
        if(ereg('Mozilla', $Agent) && !ereg('MSIE', $Agent)){
            $temp = explode('(', $Agent);
            $Part = $temp[0];
            $temp = explode('/', $Part);
            $browserver = $temp[1];
            $temp = explode(' ', $browserver);
            $browserver = $temp[0];
  &nbs


Ïà¹ØÎĵµ£º

PHP ʵÏÖ¶à·þÎñÆ÷¹²ÏíSESSIONÊý¾Ý

Ò»¡¢ÎÊÌâÆðÔ´
ÉÔ´óһЩµÄÍøÕ¾£¬Í¨³£¶¼»áÓкü¸¸ö·þÎñÆ÷£¬Ã¿¸ö·þÎñÆ÷ÔËÐÐ×Ų»Í¬¹¦ÄܵÄÄ£¿é£¬Ê¹Óò»Í¬µÄ¶þ¼¶ÓòÃû£¬¶øÒ»¸öÕûÌåÐÔÇ¿µÄÍøÕ¾£¬Óû§ÏµÍ³ÊÇͳһµÄ£¬¼´Ò»Ì×
Óû§Ãû¡¢ÃÜÂëÔÚÕû¸öÍøÕ¾µÄ¸÷¸öÄ£¿éÖж¼ÊÇ¿ÉÒԵǼʹÓõġ£¸÷¸ö·þÎñÆ÷¹²ÏíÓû§Êý¾ÝÊDZȽÏÈÝÒ×ʵÏֵģ¬Ö»ÐèÒªÔÚºó¶Ë·Å¸öÊý¾Ý¿â·þÎñÆ÷£¬¸÷¸ö·þÎñÆ÷ͨ¹ýͳһ½Ó
......

php smarty °²×° ¡¢ÅäÖá¢Ê¹Óà ¼°»º´æcacheµÄÅäÖÃʹÓÃ

cache ʹÓãº
    cacheÅäÖãº
    $smarty->cache_dir = "/caches/";  //»º´æĿ¼   
    $smarty->caching = true;  //¿ªÆô»º´æ,ΪflaseµÄʱºî»º´æÎÞЧ   
    $sma ......

php ÊÖ»úÏÂÔØ POST Àà

ÓÉÓÚ×î½üÔÚÓëSPºÏ×÷,¿ª·¢ÊÖ»úÒµÎñÏÂÔØ,Êý¾ÝÌá½»²ÉÓÃPOST·½Ê½Ìá½»,ÏÖÓë´ó¼Ò·Öºà±È½Ï³ÉÊìÀà.
function uc_api_post($url, $action, $sendmsg='') {
$postdata = "corpMsg=$sendmsg";
return uc_fopen(UC_URL, 500000, $postdata, '', TRUE, UC_IP, 20);
}
function uc_fopen($url, $limit = 0, $post = '', $cookie = ......

php»·¾³´î½¨

phpÏÂÔØ£º
http://windows.php.net/download/
Ñ¡Ôñ
VC6 x86 Thread Safe (2010-Mar-04 20:11:08)
VC6 x86´ú±í Apache HTTP Server (httpd) 2.2.15 ºÍPHP½áºÏ
apacheÏÂÔØ£º
http://httpd.apache.org/download.cgi#apache22
Ñ¡Ôñ2.2.15
httpd-2.2.15-win32-x86-no_ssl.msi [PGP] [MD5] [SHA1]
apache services 2.2Ð ......

ÀûÓÃphp»ñÈ¡Êý¾Ý¿âÖÐËùÓÐÐÅÏ¢¿É²Î¿¼phpMyAdmin


<?php
@mysql_connect("localhost", "root","1981427") //Ñ¡ÔñÊý¾Ý¿â֮ǰÐèÒªÏÈÁ¬½ÓÊý¾Ý¿â·þÎñÆ÷
or die("Êý¾Ý¿â·þÎñÆ÷Á¬½Óʧ°Ü");
$dbs = mysql_list_dbs(); //µ÷ÓÃmysql_list_dbsº¯Êý
while ($array = mysql_fetch_row($dbs)) //Ñ­»·Êä³öËùÓеÄÊý¾Ý¿âÃû³Æ
{
echo "$array[0]<BR>";
}
?>
& ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ