Changeset 6399 for sandbox/2.4.1-3/prototype/api
- Timestamp:
- 06/04/12 09:57:19 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/2.4.1-3/prototype/api/config.php
r6367 r6399 72 72 public static function writeIniFile($assoc_arr, $path, $has_sections) 73 73 { 74 $content = ''; 75 76 if (!$handle = fopen($path, 'w')) 77 { 78 trigger_error("Permission failure when trying to open the file: $path ", E_USER_WARNING); 79 return FALSE; 80 } 81 74 $content = ''; 82 75 self::_writeIniFile($content, $assoc_arr, $has_sections); 83 84 if (!fwrite($handle, $content)) 76 if( file_put_contents($path, $content) === false) 85 77 { 86 78 trigger_error("Permission failure when trying to write in the file: $path ", E_USER_WARNING); 87 } return FALSE; 88 89 fclose($handle); 90 return TRUE; 79 return false; 80 } 81 return true; 91 82 } 92 83
Note: See TracChangeset
for help on using the changeset viewer.