Changeset 20952 for branches/version-2_11-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis_ZipInstall.php
- Timestamp:
- 2011/05/21 15:22:10 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_11-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis_ZipInstall.php
r20951 r20952 55 55 /** CSV の更新日時 */ 56 56 var $tpl_csv_datetime; 57 58 /** ZIP アーカイブファイルの取得元 */59 var $zip_download_url = 'http://www.post.japanpost.jp/zipcode/dl/kogaki/zip/ken_all.zip';60 57 61 58 /** 日本郵便から取得した ZIP アーカイブファイルの保管パス */ … … 147 144 $this->tpl_csv_datetime = $this->lfGetCsvDatetime(); 148 145 // XXX PHP4 を切捨てたら、ダウンロードの必要性チェックなども行いたい 149 // $arrHeader = get_headers( $this->zip_download_url, 1);146 // $arrHeader = get_headers(ZIP_DOWNLOAD_URL, 1); 150 147 } 151 148 … … 364 361 * @return void 365 362 */ 366 363 function lfDownloadZipFileFromJp() { 367 364 // Proxy経由を可能とする。 368 365 // TODO Proxyの設定は「DATA_REALDIR . 'module/Request.php'」内の「function HTTP_Request」へ記述する。いずれは、外部設定としたい。 369 366 $req = new HTTP_Request(); 370 $req->setURL( $this->zip_download_url);371 367 $req->setURL(ZIP_DOWNLOAD_URL); 368 372 369 // 郵便番号CSVをdownloadする。 373 370 $res1 = $req->sendRequest(); … … 377 374 $fp = fopen($this->zip_csv_temp_realfile, 'w'); 378 375 $res2 = fwrite($fp, $req->getResponseBody()); 379 376 } 380 377 if (!$res1 or !$res2) { 381 378 // 郵便番号CSVの「downloadに失敗」または「書き込みに失敗」 382 SC_Utils_Ex::sfDispException( $this->zip_download_url. ' の取得または ' . $this->zip_csv_temp_realfile . ' への書き込みに失敗しました。');379 SC_Utils_Ex::sfDispException(ZIP_DOWNLOAD_URL . ' の取得または ' . $this->zip_csv_temp_realfile . ' への書き込みに失敗しました。'); 383 380 } 384 381 } 385 382 386 383 /**
Note: See TracChangeset
for help on using the changeset viewer.