⊗ppMVDFmMd 34 of 35 menu

Implementation of Models in Your Own MVC Framework

The last thing we need to implement is working with models. To start, let's in the file index.php connect the file with database connection settings (let's place this connection at the top of the file):

<?php namespace Core; error_reporting(E_ALL); ini_set('display_errors', 'on'); require_once $_SERVER['DOCUMENT_ROOT'] . '/project/config/connection.php'; ... ?>

The settings file contains PHP constants. After connecting the file, these constants will be available in all classes we call.

English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline