Sample Code: Quick and Dirty PHP Cache


Warning: Undefined variable $file_path in /www/wwwroot/abrandao.com/wp-content/themes/montezuma2026/includes/thumb.php on line 124

Deprecated: pathinfo(): Passing null to parameter #1 ($path) of type string is deprecated in /www/wwwroot/abrandao.com/wp-content/themes/montezuma2026/includes/thumb.php on line 124

Warning: Undefined array key "extension" in /www/wwwroot/abrandao.com/wp-content/themes/montezuma2026/includes/thumb.php on line 125

Warning: Undefined array key "dirname" in /www/wwwroot/abrandao.com/wp-content/themes/montezuma2026/includes/thumb.php on line 126

Warning: Undefined variable $image_src in /www/wwwroot/abrandao.com/wp-content/themes/montezuma2026/includes/thumb.php on line 131

Warning: Trying to access array offset on null in /www/wwwroot/abrandao.com/wp-content/themes/montezuma2026/includes/thumb.php on line 131

Warning: Undefined variable $image_src in /www/wwwroot/abrandao.com/wp-content/themes/montezuma2026/includes/thumb.php on line 131

Warning: Trying to access array offset on null in /www/wwwroot/abrandao.com/wp-content/themes/montezuma2026/includes/thumb.php on line 131

Warning: Undefined variable $image_src in /www/wwwroot/abrandao.com/wp-content/themes/montezuma2026/includes/thumb.php on line 196

Warning: Trying to access array offset on null in /www/wwwroot/abrandao.com/wp-content/themes/montezuma2026/includes/thumb.php on line 196

Warning: Undefined variable $image_src in /www/wwwroot/abrandao.com/wp-content/themes/montezuma2026/includes/thumb.php on line 197

Warning: Trying to access array offset on null in /www/wwwroot/abrandao.com/wp-content/themes/montezuma2026/includes/thumb.php on line 197

Warning: Undefined variable $image_src in /www/wwwroot/abrandao.com/wp-content/themes/montezuma2026/includes/thumb.php on line 198

Warning: Trying to access array offset on null in /www/wwwroot/abrandao.com/wp-content/themes/montezuma2026/includes/thumb.php on line 198
Sample Code: Quick and Dirty PHP Cache
Here’s a variation of a PHP caching script. One of the things I frequently find myself doing for page(s) that take a long time to render, especially if they are a long running process, is to generally save a recent cached page (or more specifically) cached content and serving that up, when I need to have an immediate page ...

Sample Code: prevent web page overwrites


Warning: Undefined variable $file_path in /www/wwwroot/abrandao.com/wp-content/themes/montezuma2026/includes/thumb.php on line 124

Deprecated: pathinfo(): Passing null to parameter #1 ($path) of type string is deprecated in /www/wwwroot/abrandao.com/wp-content/themes/montezuma2026/includes/thumb.php on line 124

Warning: Undefined array key "extension" in /www/wwwroot/abrandao.com/wp-content/themes/montezuma2026/includes/thumb.php on line 125

Warning: Undefined array key "dirname" in /www/wwwroot/abrandao.com/wp-content/themes/montezuma2026/includes/thumb.php on line 126

Warning: Undefined variable $image_src in /www/wwwroot/abrandao.com/wp-content/themes/montezuma2026/includes/thumb.php on line 131

Warning: Trying to access array offset on null in /www/wwwroot/abrandao.com/wp-content/themes/montezuma2026/includes/thumb.php on line 131

Warning: Undefined variable $image_src in /www/wwwroot/abrandao.com/wp-content/themes/montezuma2026/includes/thumb.php on line 131

Warning: Trying to access array offset on null in /www/wwwroot/abrandao.com/wp-content/themes/montezuma2026/includes/thumb.php on line 131

Warning: Undefined variable $image_src in /www/wwwroot/abrandao.com/wp-content/themes/montezuma2026/includes/thumb.php on line 196

Warning: Trying to access array offset on null in /www/wwwroot/abrandao.com/wp-content/themes/montezuma2026/includes/thumb.php on line 196

Warning: Undefined variable $image_src in /www/wwwroot/abrandao.com/wp-content/themes/montezuma2026/includes/thumb.php on line 197

Warning: Trying to access array offset on null in /www/wwwroot/abrandao.com/wp-content/themes/montezuma2026/includes/thumb.php on line 197

Warning: Undefined variable $image_src in /www/wwwroot/abrandao.com/wp-content/themes/montezuma2026/includes/thumb.php on line 198

Warning: Trying to access array offset on null in /www/wwwroot/abrandao.com/wp-content/themes/montezuma2026/includes/thumb.php on line 198
Sample Code: prevent web page overwrites
Below are some interesting problems and solutions that I have come accross. Problem: In a web based system how to you prevent multiple updates to the same record by different users seeing potentially different data. This is a play on the old airline reservation problem you find in older computer science text books. If  there is one ...