Seraphine
@Seraphine

Не могу подключить RedBean, что делать?

Здравствуйте. Пожалуйста, помогите понять в чем проблема. Никак не получается подключить RedBean. Не понимаю что не так и в чем вообще ошибка.
Текст ошибки:

Fatal error: Uncaught RedBeanPHP\RedException: OODB Store requires a bean, got: NULL in W:\domains\host2\libs\rb.php:10208 Stack trace: #0 W:\domains\host2\libs\rb.php(10476): RedBeanPHP\OODB->unboxIfNeeded(NULL) #1 W:\domains\host2\libs\rb.php(13349): RedBeanPHP\OODB->store(NULL) #2 W:\domains\host2\comment.php(9): RedBeanPHP\Facade::store(NULL) #3 {main} thrown in W:\domains\host2\libs\rb.php on line 10208

<?php 
    require "libs/rb.php";
    R::setup( 'mysql:host=localhost; dbname=comments','root', '' ); 
?>


<?php
    require "db.php";
    $following = R::dispense('comment');
    $following->name = $_POST['name'];
    $following->subject = $_POST['subject'];
    $following->message = $_POST['message'];

    $following = R::store($comment);
?>

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
    integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
  <link rel="stylesheet" href="css/style2.css">
    <title>Document</title>
</head>
<body>
    <div class="container">
        <div class="row">
            <form action="" method="POST">
                <input type="text" name="name">
                <input type="text" name="subject">
                <input type="text" name="message">
                <input type="submit"><br>
            </form>
        </div>
        <hr>
    </div>
</body>
</html>
  • Вопрос задан
  • 84 просмотра
Пригласить эксперта
Ваш ответ на вопрос

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

Войти через центр авторизации
Похожие вопросы
YCLIENTS Москва
от 200 000 до 350 000 ₽
Ведисофт Екатеринбург
от 25 000 ₽
ИТЦ Аусферр Магнитогорск
от 100 000 до 160 000 ₽
23 апр. 2024, в 13:02
3000 руб./за проект
23 апр. 2024, в 12:52
15000 руб./за проект