Changeset 1675
- Timestamp:
- 10/12/2007 10:25:49 PM (15 months ago)
- Files:
-
- 1 modified
-
trunk/scripts/general.func.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/scripts/general.func.php
r1671 r1675 248 248 } 249 249 250 if ( !function_exists('file_put_contents') && !defined('FILE_APPEND') ) { 251 define('FILE_APPEND', 1); 252 function file_put_contents($n, $d, $flag = false) { 253 $mode = ($flag == FILE_APPEND || strtoupper($flag) == 'FILE_APPEND') ? 'a' : 'w'; 254 $f = @fopen($n, $mode); 255 if ($f === false) { 256 return 0; 257 } else { 258 if (is_array($d)) $d = implode($d); 259 $bytes_written = fwrite($f, $d); 260 fclose($f); 261 return $bytes_written; 262 } 263 } 264 } 265 250 266 // output the administration menu 251 267 function output_admin_menu() {
