//將報表的資料抓起來
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $sReportStr);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30 );
$sFastReportResult = curl_exec($ch);
curl_close($ch);
//把檔案實體化
file_put_contents($sFileName, $sFastReportResult);
//step4
//找出檔案大小
$sFileSize=filesize($sFileName);
//把檔案搬到指定區塊
$bResult=rename($sFileName,$sPath.$sFileName);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $sReportStr);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30 );
$sFastReportResult = curl_exec($ch);
curl_close($ch);
//把檔案實體化
file_put_contents($sFileName, $sFastReportResult);
//step4
//找出檔案大小
$sFileSize=filesize($sFileName);
//把檔案搬到指定區塊
$bResult=rename($sFileName,$sPath.$sFileName);
留言
張貼留言