@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | } |
| 39 | 39 | if (!empty($path)) { |
| 40 | 40 | $tmpAction=array_pop($path); |
| 41 | - $tmpArray=explode(".",$tmpAction); |
|
| 41 | + $tmpArray=explode(".", $tmpAction); |
|
| 42 | 42 | self::$ext=$tmpArray[1]??""; |
| 43 | 43 | $tmpAction=preg_replace('/\.(html|aspx|do|php|htm|h5|api|json|xml)$/i', '', $tmpAction); |
| 44 | 44 | $tmpAction=parse_name($tmpAction, 1); |
@@ -107,9 +107,9 @@ discard block |
||
| 107 | 107 | $response=$res; |
| 108 | 108 | $renderType=self::$ext??'json'; |
| 109 | 109 | |
| 110 | - if($renderType=='json'){ |
|
| 110 | + if ($renderType == 'json') { |
|
| 111 | 111 | $response=json($res); |
| 112 | - }elseif ($renderType=='xml'){ |
|
| 112 | + }elseif ($renderType == 'xml') { |
|
| 113 | 113 | //todo:: 支持xml格式化输出 |
| 114 | 114 | $response='don\'t support xml now!'; |
| 115 | 115 | } |
@@ -109,7 +109,7 @@ |
||
| 109 | 109 | |
| 110 | 110 | if($renderType=='json'){ |
| 111 | 111 | $response=json($res); |
| 112 | - }elseif ($renderType=='xml'){ |
|
| 112 | + } elseif ($renderType=='xml'){ |
|
| 113 | 113 | //todo:: 支持xml格式化输出 |
| 114 | 114 | $response='don\'t support xml now!'; |
| 115 | 115 | } |