Changeset 9881

Show
Ignore:
Timestamp:
11/11/08 19:49:04 (2 months ago)
Author:
afz
Message:

Add file_put_contents method to Jaws_Utils

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/jaws/html/include/Jaws/Utils.php

    r9876 r9881  
    202202 
    203203    /** 
     204     * Write a string to a file 
     205     * @access  public 
     206     * @see http://www.php.net/file_put_contents 
     207     */ 
     208    function file_put_contents($file, $data, $flags = null, $resource_context = null) 
     209    { 
     210        $res = file_put_contents($file, $data, $flags, $resource_context); 
     211        if ($res !== false) { 
     212            Jaws_Utils::chmod($file); 
     213        } 
     214 
     215        return $res; 
     216    } 
     217 
     218    /** 
    204219     * Change file/directory mode 
    205220     *