SaveToFile

The WooCommerce PDF & Print SaveToFile function.

Description

SaveToFile( $file, $s, $mode ); 

Parameters (3)

0. $file
The file.
1. $s
The s.
2. $mode
The mode.

Usage

  1. if ( !function_exists( 'SaveToFile' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-pdf-print/pdf/font/makefont/makefont.php'; 
  3.  
  4. // The file. 
  5. $file = null; 
  6.  
  7. // The s. 
  8. $s = null; 
  9.  
  10. // The mode. 
  11. $mode = null; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = SaveToFile($file, $s, $mode); 
  15.  

Defined (1)

The function is defined in the following location(s).

/pdf/font/makefont/makefont.php  
  1. function SaveToFile($file, $s, $mode) 
  2. $f=fopen($file, 'w'.$mode); 
  3. if(!$f) 
  4. die('Can\'t write to file '.$file); 
  5. fwrite($f, $s, strlen($s)); 
  6. fclose($f);