File: lib/internal/template.build_dir.php

Recommend this page to a friend!
  Classes of David Tamas  >  g-template-php  >  lib/internal/template.build_dir.php  >  Download  
File: lib/internal/template.build_dir.php
Role: Example script
Content type: text/plain
Description: Example script
Class: g-template-php
Process and render templates generating PHP code
Author: By
Last change:
Date: 2 years ago
Size: 559 bytes
 

 

Contents

Class file image Download
<?php
/**
 * gTemplate Internal Function
 * Build subdirectories for caching functions
 *
 * @package gTemplate
 * @subpackage internalFunctions
 */



function template_build_dir($dir, $id, &$gTpl) {
   
$_args = explode('|', $id);
    if (
count($_args) == 1 && empty($_args[0])) {
        return
$gTpl->_get_dir($dir);
    }
   
$_result = $gTpl->_get_dir($dir);
    foreach (
$_args as $value) {
       
$_result .= $value . DIRECTORY_SEPARATOR;
        if (!
is_dir($_result)) {
            @
mkdir($_result, 0777);
        }
    }
    return
$_result;
}


For more information send a message to info at phpclasses dot org.