Exemplo n.º 1
0
 private function _echo($result)
 {
     // file_put_contents('log.txt',json_encode(IS_AJAX));
     // file_put_contents('log.txt',json_encode(PUT('debug')==true),FILE_APPEND);
     if ($this->flag && PUT('dump') == true) {
         $filename = strtolower(CONTROLLER_NAME . ACTION_NAME);
         F($filename, json_encode_format($result));
         dump_json_format($result);
         exit;
     } elseif ($this->flag && PUT('debug') == true) {
         $this->flag = false;
         $filename = strtolower(CONTROLLER_NAME . ACTION_NAME);
         $string = F($filename);
         if (empty($string)) {
             $string = json_encode_format($result);
         }
         $this->success('AJAX', $string);
     } else {
         $this->response($result, $this->_type);
     }
 }
Exemplo n.º 2
0
function dump_json_format($value)
{
    show(json_encode_format($value));
}