Php 函数获取用户id箭头聊天
我试图在我的网站上安装Php 函数获取用户id箭头聊天,php,mysql,get,customization,userid,Php,Mysql,Get,Customization,Userid,我试图在我的网站上安装Arrowchat,但找不到userid Arrowchat的原始cod如下 /** * This function returns the user ID of the logged in user on your site. Technical support will not * help you with this for stand-alone installations. You must purchase the profession
Arrowchat
,但找不到userid
Arrowchat
的原始cod如下
/**
* This function returns the user ID of the logged in user on your site. Technical support will not
* help you with this for stand-alone installations. You must purchase the professional installation
* if you are having trouble.
*
* Suggestion: Check out the other integration files in the functions/integrations directory for
* many examples of how this can be done. The easiest way is to get the user ID through a cookie.
*
* @return the user ID of the logged in user or NULL if not logged in
*/
function get_user_id()
{
$userid = NULL;
if (isset($_COOKIE['userid']))
{
$userid = $_COOKIE['userid'];
}
return $userid;
}
这在config.php中
define('DB_USERTABLE','users');
define('DB_USERTABLE_NAME','username');
define('DB_USERTABLE_USERID','idu');
define('DB_USERTABLE_AVATAR','image');
我的mysql用户ID是
idu
在哪些文件上<是网站的code>index.php还是arrowchat的integration.php
@Fred ii和此添加代码必须在index.php或integration.php上?从index.php确定没有错误,从integration.php得出此ob_start():输出处理程序“ob_gzhandler”与第22行ob_start()上的/home/u276919318/public_html/arrowchat/external.php中的“zlib output compression”冲突:无法在第22行的/home/u276919318/public_html/arrowchat/external.php中创建缓冲区。第351行的/home/u276919318/public_html/arrowchat/external.php中的数组到字符串转换未定义变量:第359行的/home/u276919318/public_html/arrowchat/external.php中的user_avatar