/ Published in: PHP
URL: http://www.evinw.com
Allows you to connect to different datasources. Very common to use something like this for development,staging and production deployments.
Expand |
Embed | Plain Text
<?php /* |--------------------------- | Author: Evin Weissenberg |--------------------------- */ class Connection { //PRODUCTION //STAGING //DEVELOPMENT if (self::$db == 1) { return true; } elseif (self::$db == 2) { return true; } elseif (self::$db == 3) { return true; } else { return false; } } } //Usage Connection::$db=3; Connection::dbConnection();
You need to login to post a comment.
