source: trunk/include/php_compat/file_put_contents.php @ 2884

Last change on this file since 2884 was 2215, checked in by rvelices, 16 years ago
  • added compatibility function file_put_contents
  • Property svn:eol-style set to LF
  • Property svn:keywords set to Author Date Id Revision
File size: 196 bytes
Line 
1<?php
2//php 5
3function file_put_contents($filename, $data)
4{
5  $fp = fopen($filename, 'w');
6  if ($fp)
7  {
8    $ret = fwrite($fp, $data);
9    fclose($fp);
10    return $ret;
11  }
12  return false;
13}
14?>
Note: See TracBrowser for help on using the repository browser.