ResponseHeaderUtils   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 14
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A setXlsHeader() 0 6 1
1
<?php
2
3
namespace Ridibooks\Platform\Common;
4
5
class ResponseHeaderUtils
6
{
7
	/**
8
	 * 윈도우환경에서 html table 전송하되, 엑셀에서 열릴 수 있게할떄 설정하는 헤더
9
	 *
10
	 * @param $file_name
11
	 */
12
	public static function setXlsHeader($file_name)
13
	{
14
		header("Content-Type: application/vnd.ms-excel;charset=utf-8");
15
		header("Content-Disposition: attachment; filename=\"$file_name.xls\"");
16
		header('Cache-Control: max-age=0');
17
	}
18
}
19