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
| //for a number of classes to load automatically | |
| //We can define the following function in our file | |
| function __autoload($class_name) | |
| { | |
| $path = str_replace("_", "/", $class_name); | |
| require_once $path.".php"; | |
| } |
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
| $load = sys_getloadavg(); | |
| if ($load[0] > 80) { | |
| header('HTTP/1.1 503 Too busy, try again later'); | |
| die('Server too busy. Please try again later.'); | |
| } | |
| /* | |
| This is a function which returns three samples of the “load” on a system. Load is the number of processes in the system run queue. The 3 items in the array are the average load for the past 1, 5 and 15 minutes. The PHP Manual shows a great usage of this: | |
| */ |
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
| --Do not remove this if you are using-- | |
| Original Author: Remiz Rahnas | |
| Original Author URL: http://www.htmlremix.com | |
| Published date: 2008/09/24 | |
| Changes by Nick Fetchak: | |
| - IE8 standards mode compatibility | |
| - VML elements now positioned behind original box rather than inside of it - should be less prone to breakage | |
| Published date : 2009/11/18 |
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 | |
| if ((($_FILES["file"]["type"] == "image/gif") | |
| || ($_FILES["file"]["type"] == "image/jpeg") | |
| || ($_FILES["file"]["type"] == "image/pjpeg")) | |
| && ($_FILES["file"]["size"] < 20000)) | |
| { | |
| if ($_FILES["file"]["error"] > 0) | |
| { | |
| echo "Error: " . $_FILES["file"]["error"] . "<br />"; | |
| } |
NewerOlder