摘要:
1.session回收//session的实效时间 session.gc_maxlifetime = 86400//垃圾回收的概率#概率是gc_probability/gc_divisorsession.gc_probability = 1session.gc_divisor = 100<?phpif(!isset($_SESSION['last_access'])||(time()-$_SESSION['last_access'])>60)$_SESSION['last_access']=time();?>http://www 阅读全文
摘要:
if(!isset($_SERVER['PHP_AUTH_USER'])||!isset($_SERVER['PHP_AUTH_PW'])||$_SERVER['PHP_AUTH_USER']!=ADMIN_USERNAME||$_SERVER['PHP_AUTH_PW']!=ADMIN_PASSWORD){Header("WWW-Authenticate:Basicrealm=\"YouNeedLogin\"");Header("HTTP/1.0401Unauthorized&q 阅读全文