我正在尝试将CometChat集成到我的Laravel APP中...我将“ CometChat”文件夹放在“公共”文件夹中
和我的Integrated.php是这样的:
/* FUNCTIONS */
// set up autoloader
$base_path = dirname(dirname(dirname(__FILE__)));
include_once($base_path.'\vendor\autoload.php');
$laravel_db_config_file = $base_path . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'database.php';
if (!file_exists($laravel_db_config_file))
{
echo "Please make sure you have the Cometchat folder in the public folder of your laravel site";
}
$app = include_once($base_path.'\bootstrap\app.php');
$config = include_once($laravel_db_config_file);
$dbl = $config['connections']['mysql'];
function getUserID() {
$userid = 0;
if (!empty($_SESSION['basedata']) && $_SESSION['basedata'] != 'null') {
$_REQUEST['basedata'] = $_SESSION['basedata'];
}
if (!empty($_REQUEST['basedata'])) {
$userid = $_REQUEST['basedata'];
}
if (!empty($_SESSION['userid'])) {
$userid = $_SESSION['userid'];
}
return $userid;
}
有什么可以帮助我吗?
预先感谢