WooParc_csv_headers

Get CSV Headers.

Description

WooParc_csv_headers(); 

Usage

  1. if ( !function_exists( 'WooParc_csv_headers' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-postnl-parcelware/inc/funct-export.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = WooParc_csv_headers(); 
  7.  

Defined (1)

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

/inc/funct-export.php  
  1. function WooParc_csv_headers() { 
  2. // disable caching 
  3. $filename='parcelware-export.csv'; 
  4. $now = gmdate("D, d M Y H:i:s"); 
  5. header("Expires: Tue, 03 Jul 2001 06:00:00 GMT"); 
  6. header("Cache-Control: max-age=0, no-cache, must-revalidate, proxy-revalidate"); 
  7. header("Last-Modified: {$now} GMT"); 
  8.  
  9. // force download  
  10. header("Content-Type: application/force-download"); 
  11. header("Content-Type: application/octet-stream"); 
  12. header("Content-Type: application/download"); 
  13. //header("Content-Type: text/plain"); 
  14.  
  15. // disposition / encoding on response body 
  16. header("Content-Disposition: attachment;filename={$filename}"); 
  17. header("Content-Transfer-Encoding: binary"); 
  18. echo "\xEF\xBB\xBF"; // UTF-8 BOM