cookie php 一天时间 不指定

Else , 2010/02/07 15:04 , 代码片段,演示也有 , Comments(0) , Reads(673) , Via Original

  if (!isset($_COOKIE['webcount']))
  {
    $db->query("update ccount set `webcount`=webcount+1 where id =1");
  }
  $mycount=$db->rows("select webcount from ptyz_count where id=1");
  $webcount=$mycount['webcount'];
  setcookie('webcount','aaa',time()+60*60*24);
Add a comment

Nickname

Site URI

Email

Enable HTML Enable UBB Enable Emots Hidden Remember [Login] [Register]