Почему появляется ошибка message: undefined property: news::$db?

0
0

При повторении кода в 3 уроке выходит ошибка:

A PHP Error was encountered
Severity: Notice

Message: Undefined property: News::$db

Filename: core/Model.php

Line Number: 73

Backtrace:

File: C:\xampp\htdocs\kinomonster\application\models\News_model.php
Line: 9
Function: __get

File: C:\xampp\htdocs\kinomonster\application\controllers\News.php
Line: 15
Function: getNews

File: C:\xampp\htdocs\kinomonster\index.php
Line: 315
Function: require_once

A PHP Error was encountered
Severity: Notice

Message: Trying to get property of non-object

Filename: models/News_model.php

Line Number: 9

Backtrace:

File: C:\xampp\htdocs\kinomonster\application\models\News_model.php
Line: 9
Function: _error_handler

File: C:\xampp\htdocs\kinomonster\application\controllers\News.php
Line: 15
Function: getNews

File: C:\xampp\htdocs\kinomonster\index.php
Line: 315
Function: require_once

An uncaught Exception was encountered
Type: Error

Message: Call to a member function result_array() on null

Filename: C:\xampp\htdocs\kinomonster\application\models\News_model.php

Line Number: 10

Backtrace:

File: C:\xampp\htdocs\kinomonster\application\controllers\News.php
Line: 15
Function: getNews

File: C:\xampp\htdocs\kinomonster\index.php
Line: 315
Function: require_once


Сергей Медведев

3 months ago

Похожие вопросы

2 ответов





Привет, пробовал исходный код скачивать? 

student_RwUH8cQ1

3 months ago

Спасибо работает!!

Сергей Медведев

3 months ago

Ваш ответ