Codeigniter 编码点火器phpBB集成
我曾尝试在Codeigniter项目中集成phpBB论坛。我将codeigniter()提供的库放在projectName/application/libraries中,并将论坛放在项目的根目录下。控制器如下所示:Codeigniter 编码点火器phpBB集成,codeigniter,phpbb,phpbb3,Codeigniter,Phpbb,Phpbb3,我曾尝试在Codeigniter项目中集成phpBB论坛。我将codeigniter()提供的库放在projectName/application/libraries中,并将论坛放在项目的根目录下。控制器如下所示: <?php class Library_test extends CI_Controller { function __construct() { parent::__construct(); $this->load-&g
<?php
class Library_test extends CI_Controller
{
function __construct()
{
parent::__construct();
$this->load->database();
$this->load->library('session');
$this->load->library('phpbb_library');
}
function index()
{
if ($this->phpbb_library->isLoggedIn() === TRUE)
{
$userId = $this->phpbb_library->getUserInfo('user_id');
$username = $this->phpbb_library->getUserInfo('username');
echo "Welcome $username (" . ($this->phpbb_library->isAdministrator() === TRUE ? "administrator" : "user") . "), your ID is $userId and you are member of the following groups";
foreach ($this->phpbb_library->getUserGroupMembership() as $group)
{
echo "$group <br />";
}
}
else
{
echo "You are not logged-in.";
}
}
}
?>
我已经为整个项目(chmod-R 777 project/)设置了适当的权限,并且错误显示为“未找到”的文件在那里并且可以访问。请帮帮我
以下是我尝试访问控制器时出现的错误
遇到一个PHP错误
严重性:警告
消息:include(localhost/communityCI/community/common.php):无法打开流:没有这样的文件或目录
文件名:libraries/phpbb.php
行号:32
遇到一个PHP错误
严重性:警告
消息:include():无法打开“localhost/communityCI/community/common.php”进行包含(include_path=':/usr/share/php:/usr/share/pear')
文件名:libraries/phpbb.php
行号:32
遇到一个PHP错误
严重性:警告
消息:include(localhost/communityCI/community/config.php):无法打开流:没有这样的文件或目录
文件名:libraries/phpbb.php
电话号码:33
遇到一个PHP错误
严重性:警告
消息:include():打开“localhost/communityCI/community/config.php”以包含失败(include_path='。:/usr/share/php:/usr/share/pear')
文件名:libraries/phpbb.php
电话号码:33
遇到一个PHP错误
严重性:警告
消息:include(localhost/communityCI/community/includes/functions\u user.php):无法打开流:没有这样的文件或目录
文件名:libraries/phpbb.php
电话号码:34
遇到一个PHP错误
严重性:警告
消息:include():无法打开“localhost/communityCI/community/includes/functions\u user.php”进行包含(include\u path='。:/usr/share/php:/usr/share/pear')
文件名:libraries/phpbb.php
电话号码:34
遇到一个PHP错误
严重性:警告
消息:include(localhost/communityCI/community/includes/functions\u display.php):无法打开流:没有这样的文件或目录
文件名:libraries/phpbb.php
电话号码:35
遇到一个PHP错误
严重性:警告
消息:include():无法打开“localhost/communityCI/community/includes/functions_display.php”进行包含(include_path='。:/usr/share/php:/usr/share/pear')
文件名:libraries/phpbb.php
电话号码:35
遇到一个PHP错误
严重性:警告
消息:include(localhost/communityCI/community/includes/functions\u privmsgs.php):无法打开流:没有这样的文件或目录
文件名:libraries/phpbb.php
电话号码:36
遇到一个PHP错误
严重性:警告
消息:include():无法打开“localhost/communityCI/community/includes/functions_privmsgs.php”以包含(include_path='。:/usr/share/php:/usr/share/pear')
文件名:libraries/phpbb.php
电话号码:36
遇到一个PHP错误
严重性:警告
消息:include(localhost/communityCI/community/includes/functions\u posting.php):无法打开流:没有这样的文件或目录
文件名:libraries/phpbb.php
电话号码:37
遇到一个PHP错误
严重性:警告
消息:include():无法打开“localhost/communityCI/community/includes/functions_posting.php”以包含(include_path='。:/usr/share/php:/usr/share/pear')
文件名:libraries/phpbb.php
电话号码:37
致命错误:对第39行/var/www/communityCI/application/libraries/phpbb.php中的非对象调用成员函数session_begin()
包括(localhost/communityCI/community/common.php)
/var/www/communityCI/application/libraries/phpbb.php
你不应该从URL中包含;它很可能不起作用(就像你在这里看到的),也不是好的实践
您的是否包含带有文件相对路径或绝对路径的:
include('/var/www/communityCI/community/common.php');
您也不应该chmod 0777
整个项目