PhpQQ logs on to the session ['state'] and cannot find the virtual space to solve the problem (I don't know if it is related to this) use QQsdkphp for QQ login. set the config and session file to end with only one // session. php code & lt ;? Php/** & nbsp; * PHPSDKforQQ login Op php QQ login session ['state'] cannot be found
Virtual Space of the easy-to-contact host (I don't know if it is related to this)
Use qq sdk php for QQ login
Set the config and session files according to the steps.
There is only one end
Function close ()
{
$ This-> gc (ini_get ('session. gc_maxlifetime '));
// Close database-connection
Return @ mysql_close ($ this-> db_handle );
}
Function read ($ sessID)
{
// Fetch session-data
$ Res = @ mysql_query ("SELECT session_data AS d FROM". self: db_table ."
WHERE session_id = '$ sessID'
AND session_expires> ". time (), $ this-> db_handle );
// Return data or an empty string at failure
If ($ row = @ mysql_fetch_assoc ($ res ))
Return $ row ['D'];
Return "";
}
Function write ($ sessID, $ sessData)
{
// New session-expire-time
$ NewExp = time () + $ this-> lifeTime;
// Is a session with this id in the database?
$ Res = @ mysql_query ("SELECT * FROM". self: db_table ."
WHERE session_id = '$ sessID' ", $ this-> db_handle );
// If yes,
If (@ mysql_num_rows ($ res ))
{
//... Update session-data
@ Mysql_query ("UPDATE". self: db_table ."
SET session_expires = '$ newExp ',
Session_data = '$ sessdata'
WHERE session_id = '$ sessID' ", $ this-> db_handle );
// If something happened, return true
If (@ mysql_affected_rows ($ this-> db_handle ))
Return true;
}
Else // if no session-data was found,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.