一个session,判断用户唯一的技巧
public function childId($value = null)
{
static $key = 'media_app_child_id';
if ($value!==null) {
$this->Session->write($key, $value);
} else {
$value = $this->Session->read($key);
}
return $value;
}
$child_id = $this->childId($child_id);调用,如果是同一个人,获取同一个数据