WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDES  |  PHP CLASSES  |  CODE SEARCH  |  ARTICLES SEARCH  |  PHP FORUMS  |  PHP MANUAL  |  PHP FUNCTIONS LIST  |  WEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Submit Your Code
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
WeberDev's Monthly code contest PHP Code Contest
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Index
PHP Web Logs (BLogs)
Web Development Resources
Web Development Content
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
Submit Site
Forex Trading Online forex trading platform

Go Back Add a Comment Send this example to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES ADD CODE EXAMPLES PRINT
Title : Cache parsed templates of ETS - Easy Template System with Turck-MMCache
Categories : PHP, Templates Update Picture
Franck Marcia
Date : Jun 11th 2003
Grade : 3 of 5 (graded 1 times)
Viewed : 3380
File : No file for this code example.
Images : No Images for this code example.
Search : More code by Franck Marcia
Action : Grade This Code Example
Tools : My Examples List

  Submit your own code examples 
 

* Here are 3 functions you can use to store parsed template into shared memory with Turck MMCache
(http://www.turcksoft.com/en/e_mmc.htm)

<?php

// read a template file
function ets_source_read_handler($template)
{
   
$content = FALSE;
    if (
$handle = @fopen($template, 'rb')) {
       
$size = @filesize($template);
       
$content = @fread($handle, $size);
       
fclose($handle);
    }
    return
$content;
}

// retrieve a parsed template from shared memory
function ets_cache_read_handler($template)
{
   
$content = FALSE;
   
$t_template = mmcache_get("T_$template");
    if (
$t_template > @filemtime($template)) {
       
$content = mmcache_get("C_$template");
        if (
is_null($content)) {
           
$content = FALSE;
        }
    }
    return
$content;
}

// store a parsed template into shared memory
function ets_cache_write_handler($template, $content)
{
   
mmcache_put("T_$template", time());
   
mmcache_put("C_$template", $content);
}

?>

http://ets.sourceforge.net



PHP template processing
Categories : PHP, Templates, HTML and PHP
GoTemplate
Categories : PHP, Complete Programs, Templates
Parsing Simple Template Files and Data
Categories : PHP, PHP Classes, Templates, Regexps
Alternating list with TemplateTamer
Categories : PHP, Templates
Query2Report : Generating Html, Pdf and Csv Reports from SQL Query
Categories : PHP, PHP, HTML, PDF, Excel
Expose - PHP template engine, supports server and client-sided caching,a plugin system, multiple languages, template script language is based on PHP itself.
Categories : PHP, PHP Classes, Templates, Complete Programs
Simple Template Class/Example
Categories : PHP, Templates, PHP Classes
Very minimal templating engine
Categories : PHP, PHP Classes, Templates
Website Engine
Categories : PHP, HTML and PHP, Templates
Retrieve text from table and email to your e- address in pipe delimited format.
Categories : PHP, MySQL
Accepts a database & hostname from a user and then HTTP username and password. Uses this to connect to a MySQL database. Produces a form based on the tables it finds there to allow the user to do SELECTs, INSERTs, and DELETEs.
Categories : Databases, PHP, MySQL, Complete Programs
PHP Script to find url links in a page
Categories : PHP, URLs, Regexps, Arrays
Using $PHP_AUTH_USER and $PHP_AUTH_PW to authenticate.
Categories : Authentication, PHP
very simple ftp class
Categories : PHP, PHP Classes, FTP
PHP Paypal IPN Integration Class v1.0.0
Categories : PHP, PHP Classes, Payment Gateways