2016-04-02 31 views

答えて

1

を参照するには、より詳細訪問のためのスクリプトPart->

private function newSid() { 

     $this->sessionId=$this->generateString($this->sid_len); 

     while ($this->getSidCount($this->sessionId) > 0 || is_int($this->sessionId)) { 

       $this->sessionId=$this->generateString($this->sid_len); 

     } 

     $this->forcedExpire = time()+ $this->session_max_duration; 
     $expireTime = time() + $this->session_duration; 

     $this->SQLStatement_InsertSession->bindParam(':expires', $expireTime, PDO::PARAM_INT); 
     $this->SQLStatement_InsertSession->bindParam(':forcedExpires', $this->forcedExpire, PDO::PARAM_INT); 
     $this->SQLStatement_InsertSession->bindParam(':sid', $this->sessionId, PDO::PARAM_STR, $this->sid_len); 
     $this->SQLStatement_InsertSession->bindParam(':ua', $this->getUa(), PDO::PARAM_STR, 40); 

     return $this->SQLStatement_InsertSession->execute(); 

} 

で、問題はここにある:

その代わりの
$this->SQLStatement_InsertSession->bindParam(':ua', $this->getUa(), PDO::PARAM_STR, 40); 

、変数に$this->getUa()を代入してみてください。

$ua = $this->getUa(); 
$this->SQLStatement_InsertSession->bindParam(':ua', $ua, PDO::PARAM_STR, 40); 
関連する問題