Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
Storing a PDO instance as a static variable.
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Jaden" data-source="post: 346492" data-attributes="member: 51705"><p>Can this be done? If so, how?</p><p></p><p>Global Class:</p><p>[PHP]<?php</p><p>/**</p><p>* &BabboCMS - Simple content management system.</p><p>* Using: MVC Folder Structure.</p><p>*</p><p>* Developed and designed strictly for the use of Babbo Hotel.</p><p>* This CMS is under copyright law and is not for release nor for sale.</p><p>* Written by Babbo Hotel (babbo.ws), content edited by Adam (Wicked).</p><p>* Brought to you, an exploit-free, dynamic content management system.</p><p>*</p><p>* https://babbo.ws</p><p>*</p><p>* @author Jaden (Moonshine), Josh</p><p>* @since July 16, 2015</p><p>* @version 3.0.3</p><p>* @license https://babbo.ws</p><p>*/</p><p></p><p>require ROOT.'/vendor/autoload.php';</p><p>require MAIN.'/core.php';</p><p></p><p>__autoload('Engine');</p><p>__autoload('Route');</p><p>__autoload('Template');</p><p></p><p>Core::SetIpAddress();</p><p></p><p>Core::Load('Extensions');</p><p>Core::Load('Languages');</p><p>Core::Load('Models');</p><p></p><p>Core::$Config = require MAIN.'/config.php';</p><p></p><p>Engine::Init();</p><p></p><p>Core::$MySql = Engine::get();[/PHP]</p><p></p><p>Core::$MySql is literally just a predefined variable.</p><p>Engine::get() either starts a new PDO instance based on the parameters, or gets the default instance which is also predefined.</p></blockquote><p></p>
[QUOTE="Jaden, post: 346492, member: 51705"] Can this be done? If so, how? Global Class: [PHP]<?php /** * &BabboCMS - Simple content management system. * Using: MVC Folder Structure. * * Developed and designed strictly for the use of Babbo Hotel. * This CMS is under copyright law and is not for release nor for sale. * Written by Babbo Hotel (babbo.ws), content edited by Adam (Wicked). * Brought to you, an exploit-free, dynamic content management system. * * https://babbo.ws * * @author Jaden (Moonshine), Josh * @since July 16, 2015 * @version 3.0.3 * @license https://babbo.ws */ require ROOT.'/vendor/autoload.php'; require MAIN.'/core.php'; __autoload('Engine'); __autoload('Route'); __autoload('Template'); Core::SetIpAddress(); Core::Load('Extensions'); Core::Load('Languages'); Core::Load('Models'); Core::$Config = require MAIN.'/config.php'; Engine::Init(); Core::$MySql = Engine::get();[/PHP] Core::$MySql is literally just a predefined variable. Engine::get() either starts a new PDO instance based on the parameters, or gets the default instance which is also predefined. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
Storing a PDO instance as a static variable.
Top