可以用get傳值,也能通過靜態方法Response::show()調用
if (isset($_GET['format'])) {
$type = in_array($_GET['format'], array('json', 'xml', 'array')) ? $_GET['format'] : SELF::JSON;
}
if (isset($_GET['format'])) {
$type = in_array($_GET['format'], array('json', 'xml', 'array')) ? $_GET['format'] : SELF::JSON;
}
2016-07-26
舉報
2016-07-26
可以 但是不感覺代碼多嗎