File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -209,30 +209,27 @@ public function ServerJson($data,$option=JSON_UNESCAPED_UNICODE){
209
209
Http::header ("Content-type: application/json " );
210
210
//传入0 不做处理
211
211
if ($ option ==0 ){
212
- $ this ->conn ->send (json_encode ($ data ));
212
+ return $ this ->conn ->send (json_encode ($ data ));
213
213
}else {
214
214
215
215
if ($ option ==JSON_UNESCAPED_UNICODE ) {
216
216
// json_encode的JSON_UNESCAPED_UNICODE参数 PHP版本必须是5.4以上
217
217
if (version_compare (PHP_VERSION ,'5.4.0 ' ,'>= ' )) {
218
- $ this ->conn ->send (json_encode ($ data ,$ option ));
218
+ return $ this ->conn ->send (json_encode ($ data ,$ option ));
219
219
}else {
220
220
// PHP版本小于5.3的支持 未经测试
221
-
222
221
// 实现方法一 如下 实现方法二 可以使用urldecode函数
223
222
// $str = json_encode($data);
224
223
// $str = preg_replace_callback("#\\\u([0-9a-f]{4})#i",function($matchs){
225
224
// iconv('UCS-2BE', 'UTF-8', pack('H4', $matchs[1]));
226
225
// },$str);
227
- // $this->conn->send($str);
228
- $ this ->conn ->send (json_encode ($ data ));
226
+ // return $this->conn->send($str);
227
+ return $ this ->conn ->send (json_encode ($ data ));
229
228
}
230
229
}
231
230
232
231
// 如果传入了别的参数
233
- $ this ->conn ->send (json_encode ($ data ),$ option );
234
-
235
-
232
+ return $ this ->conn ->send (json_encode ($ data ),$ option );
236
233
}
237
234
}
238
235
You can’t perform that action at this time.
0 commit comments