WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDESPHP CLASSESCODE SEARCHARTICLES SEARCHPHP FORUMSPHP MANUALPHP FUNCTIONS LISTWEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Join us on FaceBook
Submit a code Example / Snippet Submit Your Code
Poker Tournaments Poker Tournaments
Poker Guide for Developers Poker Guide for Developers
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
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 Resources
Web Development Content
Internet Security Software
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
פרייסז - הכח לקנות עובר לידיים שלך
Texas Holdem Poker Evangelists

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 : 5503
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  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



Parsing Simple Template Files and Data
Categories : PHP, PHP Classes, Templates, Regexps
Query2Report : Generating Html, Pdf and Csv Reports from SQL Query
Categories : PHP, PHP, HTML, PDF, Excel
Simple Template Class/Example
Categories : PHP, Templates, PHP Classes
Alternating list with TemplateTamer
Categories : PHP, Templates
Very minimal templating engine
Categories : PHP, PHP Classes, Templates
PHP template processing
Categories : PHP, Templates, HTML and PHP
GoTemplate
Categories : PHP, Complete Programs, Templates
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
Website Engine
Categories : PHP, HTML and PHP, Templates
Monthly and Daily Upcoming Events calendar.
Categories : Date Time, PostgreSQL, PHP, Calendar, Databases
MySQL to XML.
Categories : MySQL, XML, PHP
URL validator and reformatter
Categories : PHP, URLs
Example of function to send out email if error occurs
Categories : PHP, Email, Debugging, Errors and Logging
ifx_connect -- Open Informix server connection
Categories : PHP, PHP Functions, Informix, PHP Functions
Sort the results from a SELECT query (any number of columns) into an array automatically.
Categories : PHP, PHP Classes, Arrays, Databases, MySQL