<MyRusakov.ru />

Программирование на C++ в Unreal Engine 5

Программирование на C++ в Unreal Engine 5

Данный курс научит Вас созданию игр на C++ в Unreal Engine 5. Курс состоит из 12 разделов, в которых Вас ждёт теория и практика. Причём, в качестве практики будет создан весьма крупный проект объёмом свыше 5000 строк качественного кода, который уже на практике познакомит Вас с принципами создания игр на C++ в Unreal Engine 5.

Параллельно с курсом Вы также будете получать домашние задания, результатом которых станет, в том числе, полноценная серьёзная работа для портфолио.

Помимо самого курса Вас ждёт ещё и очень ценный Бонус: «Тестирование Unreal-проектов на Python», в рамках которого Вы научитесь писать очень полезные тесты для тестирования самых разных аспектов разработки игр.

Подробнее
Подписка

Подпишитесь на мой канал на YouTube, где я регулярно публикую новые видео.

YouTube Подписаться

Подписавшись по E-mail, Вы будете получать уведомления о новых статьях.

Подписка Подписаться

Добавляйтесь ко мне в друзья ВКонтакте! Отзывы о сайте и обо мне оставляйте в моей группе.

Мой аккаунт Мой аккаунт Моя группа
Опрос

Какая тема Вас интересует больше?

Форум сайта MyRusakov.ru

Проблема с 8 уроком по создание движка
06.06.2016 10:49:37 Проблема с 8 уроком по создание движка Сообщение #1
shmel010201

shmel010201

Освоившийся

Освоившийся

Дата регистрации:
03.05.2016 17:31:25

Сообщений: 23

У меня вот такая ошибка


Warning: session_start() [http://guruphp.com.us/function.session-start]: Cannot send session cookie - headers already sent by (output started at
Z:\home\guruphp.com.us\www\lib\database_class.php:162) in Z:\home\guruphp.com.us\www\lib\modules_class.php on line 22

Warning: session_start() [http://guruphp.com.us/function.session-start]: Cannot send session cache limiter - headers already sent (output
started at Z:\home\guruphp.com.us\www\lib\database_class.php:162) in Z:\home\guruphp.com.us\www\lib\modules_class.php on line 22

Fatal error: Call to a member function getAll() on a non-object in Z:\home\guruphp.com.us\www\lib\global_class.php on line 49

Посмотрите код и помогите

Modules_class.php
<?php
    require_once "config_class.php";
    require_once "article_class.php";
    require_once "section_class.php";
    require_once "user_class.php";
    require_once "menu_class.php";
    require_once "banners_class.php";
    require_once "message_class.php";

    abstract class Modules {

        protected $config;
        protected $article;
        protected $section;
        protected $user;
        protected $menu;
        protected $banner;
        protected $message;
        protected $data;

        public function __construct($db){
        session_start();
        $this->config=new Config();
        $this->article=new Article($db);
        $this->section=new Section($db);
        $this->user=new User($db);
        $this->menu=new Menu($db);
        $this->banner=new Banners($db);
        $this->message=new Message();

        $this->data=$this->secureData($_GET);
        }

        public function getContent() {
            $sr["title"] = $this->getTitle();
            $sr["meta_desc"] = $this->getDescription();
            $sr["meta_key"] = $this->getKeywords();
            $sr["menu"] = $this->getMenu();
            $sr["auth_user"] = $this->getAuthUser();
            $sr["banners"] = $this->getBanners();
            $sr["top"] = $this->getTop();
            $sr["middle"] = $this->getMiddle();
            $sr["bottom"] = $this->getBottom();
            return $this->getReplaceTemplate($sr, "main";
        }

        abstract protected function getTitle();
        abstract protected function getDescription();
        abstract protected function getKeywords();
        abstract protected function getMiddle();

        protected function getMenu() {
            $menu = $this->menu->getAll();
            for ($i=0; $i < count($menu); $i++) {
                $sr["title"] = $menu[$i]["title"];
                $sr["link"] = $menu[$i]["link"];
                $text .= $this->getReplaceTemplate($sr, "menu_item";
            }
            return $text;
        }

        protected function getAuthUser() {
            $sr["message_auth"] = "";
            return $this->getReplaceTemplate($sr, "form_auth";
        }

        protected function getBanners() {
            $banners = $this->banner->getAll();
            for ($i=0; $i < count($banner); $i++) {
                $sr["code"] = $banner[$i]["code"];
                $text .= $this->getReplaceTemplate($sr, "banner";
            }

            return $text;
        }

        protected function getTop() {
            return "";
        }

        protected function getBottom() {
            return "";
        }

        private function secureData($data) {
            foreach ($data as $key => $value) {
                if(is_array($value)) $this->secureData($value);
                else $data[$key] = htmlspecialchars($value);
            }
            return $data;
        }

        protected function getTemplate($name) {
            $text = file_get_contents($this->config->dir_tmpl.$name.".tpl";
            return str_replace("%address%", $this->config->address, $text);
        }

        protected function getReplaceTemplate($sr, $template) {
            return $this->getReplaceContent($sr, $this->getTemplate($template));
        }

        private function getReplaceContent($sr, $content) {
            $search = array();
            $replace = array();
            $i = 0;
            foreach ($sr as $key => $value) {
                $search[$i] = $key;
                $replace[$i] = $value;
                $i++;
            }
            return str_replace($search, $replace, $content);
        }
    }
?>
global_class.php
<?php
    require_once "config_class.php";
    require_once "checkvalid_class.php";
    require_once "database_class.php";

    abstract class GlobalClass {

        private $db;
        private $table_name;
        protected $config;
        protected $valid;

        protected function __construct($table_name, $db) {
            $this->db = $db;
            $this->table_name = $table_name;
            $this->config = new Config();
            $this->valid = new CheckValid();
        }

        protected function add($new_values) {
            return $this->db->insert($this->table_name, $new_values);
        }

        protected function edit($id, $upd_fields) {
            return $this->db->updateOnID($this->table_name, $id, $upd_fields);
        }

        public function delete($id) {
            return $this->db->deleteOnID($this->table_name, $id);
        }

        public function deleteAll() {
            return $this->db->deleteAll($this->table_name);
        }

        protected function getField($field_out, $field_in, $value_in) {
            return $this->db->getField($this->table_name, $field_out, $field_in, $value_in);
        }

        protected function getFieldOnID($id, $field, $value) {
            return $this->db->getFieldOnID($this->table_name, $id, $field, $value);
        }

        public function get($id) {
            return $this->db->getElementOnID($this->table_name, $id);
        }

        public function getAll($order = "", $up = true) {
            return $this->db->getAll($this->table_name, $order, $up);
        }

        protected function getAllOnField($field, $value, $order = "", $up = true) {
            return $this->db->getAllOnField($this->table_name, $field, $value, $order, $up);
        }

        public function getRandomElement($count) {
            return $this->db->getRandomElement($this->table_name, $count);
        }

        public function getLastID() {
            return $this->db->getLastID($this->table_name);
        }

        public function getCount() {
            return $this->db->getCount($this->table_name);
        }

        public function isExists($field, $value) {
            return $this->db->isExists($this->table_name, $field, $value);
        }
    }
?>
Вот в чем моя ошибка???
Скажите Пожалуйста
Профиль
15.06.2016 08:06:57 Проблема с 8 уроком по создание движка Сообщение #2
atlanta

atlanta

Новичок

Новичок

Дата регистрации:
01.05.2015 04:53:39

Сообщений: 18

protected functiongetAllOnFieldа нужно вот так :

protected function getAllOnField
Профиль
16.06.2016 15:24:18 Проблема с 8 уроком по создание движка Сообщение #3
shmel010201

shmel010201

Освоившийся

Освоившийся

Дата регистрации:
03.05.2016 17:31:25

Сообщений: 23

Исправил но все равно ошибка
Профиль