This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| I decided to create a singleton wrapper for PDO that ensures only one instance is ever used. | |
| It uses PHP 5.3.0's __callStatic functionality to pass on statically called methods to PDO. | |
| This means you can just call it statically from anywhere without having to initiate or define the object. | |
| Usage examples: | |
| <?php | |
| DB::exec("DELETE FROM Blah"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // gzip.php v1.2 - read http://rm.pp.ru/?1.phpgzip | |
| // released on 2004-05-06, by Roman Mamedov<roman at rm.pp.ru> | |
| // license: do with this code whatever you want. | |
| ///// Configuration ////////////////// | |
| $PREFER_DEFLATE = false; // prefer deflate over gzip when both are supported | |
| $FORCE_COMPRESSION = false; // force compression even when client does not report support | |
| ////////////////////////////////////// |
NewerOlder