zenithxxl
@zenithxxl
Начинающий веб-разработчик

В чём ошибка Red Bean?

Выдаёт ошибку
Fatal error: Cannot declare interface RedBeanPHP\Logger, 
because the name is already in use in C:\OSPanel\domains\shop.com\rb\rb.php on line 19
Первые строки rb.php
spoiler
<?php

namespace RedBeanPHP {

/**
 * RedBean Logging interface.
 * Provides a uniform and convenient logging
 * interface throughout RedBeanPHP.
 *
 * @file    RedBean/Logging.php
 * @author  Gabor de Mooij and the RedBeanPHP Community
 * @license BSD/GPLv2
 *
 * @copyright
 * copyright (c) G.J.G.T. (Gabor) de Mooij and the RedBeanPHP Community
 * This source file is subject to the BSD/GPLv2 License that is bundled
 * with this source code in the file license.txt.
 */
interface Logger
{
	/**
	 * A logger (for PDO or OCI driver) needs to implement the log method.
	 * The log method will receive logging data. Note that the number of parameters is 0, this means
	 * all parameters are optional and the number may vary. This way the logger can be used in a very
	 * flexible way. Sometimes the logger is used to log a simple error message and in other
	 * situations sql and bindings are passed.
	 * The log method should be able to accept all kinds of parameters and data by using
	 * functions like func_num_args/func_get_args.
	 *
	 * @param string $message, ...
	 *
	 * @return void
	 */
	public function log();
}
}

db.php
spoiler
<?php
require 'rb/rb.php';
require 'includes/config.php';


R::setup( 'mysql:host=localhost;dbname=BlueRedit',
    'root', '' );

session_start();
$connect = mysqli_connect(
    $config['db']['server'],
    $config['db']['username'],
    $config['db']['password'],
    $config['db']['name']
);


$categories = mysqli_query($connect, "SELECT * FROM `articles_cotegories`");
while ($cat = mysqli_fetch_assoc($categories) ) {
    //...
}

$nickname = $_SESSION['logged_user']->nickname;
?>
  • Вопрос задан
  • 102 просмотра
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы