×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: Dylan Lopez
Added: Nov 22, 2017 6:11 AM
Modified: Mar 19, 2018 5:46 AM
Views: 2598
Tags: no tags
  1. //write to file
  2. $filename = 'update_banners.txt';
  3. $file_location = APPPATH . 'cache' . "/". $filename;
  4. $file_data = '';
  5.  
  6. $handle = fopen($file_location, 'w') or die('Cannot open file:  '.$file_location);
  7. fwrite($handle, $file_data);
  8. fclose($handle);