Ignore:
Timestamp:
Dec 3, 2005 11:23:27 PM (19 years ago)
Author:
scdev
Message:

Updated CSS.inc.php to: 1. set different css files attached to an app with /css.php?app=name; 2. use file pointer from fopen() opening file from include path to get mtime.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Utilities.inc.php

    r25 r26  
    234234 
    235235    return sprintf($format, $size, $units[$i]);
     236}
     237
     238/**
     239 * Returns stats of a file from the include path.
     240 *
     241 * @param   string  $file   File in include path.
     242 * @return  mixed   Value of requested key from fstat(), or false on error.
     243 * @author  Quinn Comendant <quinn@strangecode.com>
     244 * @since   03 Dec 2005 14:23:26
     245 */
     246function statIncludePath($file, $stat)
     247{
     248    // Open file pointer read-only using include path.
     249    if ($fp = fopen($file, 'r', true)) {
     250        // File opend successfully, get stats.
     251        $stats = fstat($fp);
     252        fclose($fp);
     253        // Return specified stats.
     254        return $stats[$stat];
     255    } else {
     256        return false;
     257    }
    236258}
    237259
Note: See TracChangeset for help on using the changeset viewer.