1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
<?php include("./_common.php"); ?> <? $idx = $_POST['code_idx'][0]; $appv = $_POST['appv_no_list'][$idx]; //계산서코드 $srv = $_POST['mgmt_no_list'][$idx]; //내부코드 $iDate = $_POST['isu_date_list'][$idx]; //전송일 $compsn = $_POST['comp_sn_list'][$idx]; //사업자번호
$year = substr($iDate,0,4); $month = substr($iDate,4,2);
$location = $year."/".$month."/".$compsn;
$filename = $appv.".xml"; //$downloadfile = "http://{$DB_HOSTtax}:8080/".$location."/".$filename; $str = "appvNo={$appv}&srvCode={$srv}&isuDate={$iDate}&CompanyNum=$compsn"; $downloadfile = "http://{$DB_HOSTtax}:7000/downloadXML.jsp?".$str;
if($appv == "" || $srv == "" || $iDate == "" || $compsn == ""){ return; } header("Content-type: application/octet-stream"); header("Content-disposition: attachment; filename=$filename"); header("Content-Transfer-Encoding: binary");
$uploaded_filename = $downloadfile; $filename='1';
ob_start(); $ch = curl_init(); curl_setopt($ch,CURLOPT_HEADER,0); curl_setopt($ch,CURLOPT_URL,$uploaded_filename); curl_exec($ch); curl_close($ch); echo ob_get_clean();
?>
|