21 lines
554 B
PHP
21 lines
554 B
PHP
<?php
|
|
|
|
namespace lib\Controllers;
|
|
|
|
require_once "lib/autoload.php";
|
|
|
|
if ($argc < 2) {
|
|
die("사용법 : php main.php 데이타파일명 [Type]\n");
|
|
}
|
|
if (!is_file($argv[1])) {
|
|
die($argv[1] . "는 파일형식이 아닙니다. \n");
|
|
}
|
|
$client_field = isset($argv[2]) ? $argv[2] : 'Client_Code';
|
|
$lines = file($argv[1]);
|
|
if (!is_array($lines)) {
|
|
die($argv[1] . "는 파일데이터에 오류가 있습니다. \n");
|
|
}
|
|
$control = new ServiceController();
|
|
$control->execute($lines, $client_field);
|
|
echo "Coupon 설정이 완료되었습니다.\n";
|