×

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
Views: 3
Tags: no tags
write content to text file
  1. //write to file
  2. $file_data = '';
  3. $handle = fopen($file_location, 'w') or die('Cannot open file:  '.$file_location);
  4. fwrite($handle, $file_data);
  5. fclose($handle);