µÃµ½¿Í»§¶ËµÄIP£¨php£©
µÃµ½¿Í»§¶ËµÄIP£¨php£©
×÷Õß: laoyuanyyw ·¢±íÈÕÆÚ: 2006-08-01 10:43 ÎÄÕÂÊôÐÔ: Ô´´ ¸´ÖÆÁ´½Ó
function get_client_ip()
{
if(getenv('HTTP_CLIENT_IP'))
{
$client_ip = getenv('HTTP_CLIENT_IP');
}
elseif(getenv('HTTP_X_FORWARDED_FOR'))
{
$client_ip = getenv('HTTP_X_FORWARDED_FOR');
}
elseif(getenv('REMOTE_ADDR'))
{
$client_ip = getenv('REMOTE_ADDR');
}
else
{
$client_ip = $HTTP_SERVER_VAR['REMOTE_ADDR'];
}
return $client_ip;
}
Ïà¹ØÎĵµ£º
PHPÊÇÒ»¸öºÜÓÅÐãµÄ¹¤¾ß£¬Ëü¿ÉÒÔ¼òµ¥£¬Ò²¿ÉÒÔ¸´ÔÓ¡£²»Ò»ÑùµÄÏîÄ¿£¬Ó¦¸ÃÓò»Ò»ÑùµÄPHP¡£
СÏîÄ¿ - ¼òµ¥¶øÖ±½ÓµÄPHP
Ò»°ã¶ÔÓÚÒ»¸ö¹¦ÄÜÒ³ÃæÔÚ20ÒÔϵÄÍøÕ¾£¬ÎÒÃÇ¿ÉÒÔÓÃÒ»¸öºÜ¼òµ¥µÄ¿ò¼Ü½á¹¹À´Ð´¡£ÔÚÕâ¸ö¹æÄ£ÉÏ£¬ÎÒ½¨ÒéÊÇʹÓñȽÏÖ±½ÓµÄÃæÏò¹ý³Ì±àÂë·½·¨£¬ÔÒòºÜ¼òµ¥£¬Ã»ÓбØÒª°ÑclassÎļþŪµÄN ¶à£¬½ ......
<?php
header("content-type:text/html; charset=UTF-8");
/*
* record kid words and insert into database
* user by sending email to publication kid words
*
*/
include 'POP3.php';
include 'email_class.php';
include 'Mail_mimeDecode.php';
//include 'include/compatible ......
smarty×÷ΪPHPµÄÄ£°å£¬ÊµÏÖÁËǰ̨ÃÀ¹¤Óëºǫ́Âß¼µÄ·ÖÀ롣ǰһ¶Îʱ¼ä¼òµ¥µØѧÁËһϣ¬°ÑÆä°²×°ÓÚÅäÖÃÒÔ¼°ÄÚ²¿µÄÓï·¨À´¼òµ¥×ܽáһϡ£È»ºóÒªÉè¼Æһϵç×ÓÉÌÎñϵͳ¡£
smartyѹËõ°ü½âѹºó£¬ÔÚlibsÎļþ¼ÐÏ£¬ÓÐ2¸öĿ¼ºÍ4¸öÎļþ£¬2¸öÎļþ¼Ð·Ö±ðÊÇinternalsºÍplugins£¬4¸öÎļþÒÀ´ÎÊÇdebug,smarty.class,config_file.class,smarty ......
Ò»¡¢»º´æ¼¼Êõ:
ÓÐЩÐÅÏ¢±È·½¾³£²»±äµÄ,µ«ÊÇ»¹ÊÇÄܱäµÄÐÅÏ¢·ÅÔÚ»º´æÖÐÒÔ¼Ó¿ìÏÔʾËÙ¶È,ÕâÊǺÜÓмÛÖµµÄ,ËùνµÄ»º´æ,ͨË×µÄÀí½â¾ÍÊÇһЩ±£´æÔÚ·þÎñÆ÷¶ËµÄ¹²ÓÃÐÅÏ¢.ËüÊÇÓÚ·þÎñÆ÷ͬÉúËÀµÄ,ÎÒÃÇÔÚ±£´æ»º´æµÄʱºò¿ÉÒÔÖ¸¶¨Ï´θüеÄʱ¼äµÄÅжÏ,±È·½ÒªÔÚ5·ÖÖÓ¸üÐÂÒ»´Î,¿ÉÒԼǼÉϴθüеÄʱ¼ä,ºÍµ±Ç°Ê±¼ä±È½Ï, ......
php±íµ¥ÔÚÌá½»Ö®ºóÔÙºóÍË,±íµ¥µÄÄÚÈÝĬÈÏÊDZ»Çå¿ÕµÄ(ʹÓÃsession_startµÄʱºò),
½â¾ö·½·¨ÊÇÔÚsession_start()Ö®ºó,×Ö·ûÊä³ö֮ǰдÉÏ
header(“Cache-control: private”);
ÍøÒ³µÄ»º´æÊÇÓÉHTTPÏûϢͷÖеēCache-control”À´¿ØÖƵģ¬³£¼ûµÄÈ¡ÖµÓÐprivate¡¢no- cache¡¢max-age¡ ......