public function errorAction($exception) { $code = 500; $detail = $exception->getMessage(); $error = array('code' => $code, 'detail' => $detail, 'data' => array()); TZ_Request::send($error); }
public function codeAction() { $n = $o = array(); $key = '7b7e7b6165923a5d'; $data[] = md5('1'); $data[] = md5('2'); $data[] = md5('3'); $data[] = md5('4'); $data[] = md5('5'); $data[] = md5('6'); $data[] = md5('7'); $data[] = md5('8'); $data[] = md5('9'); $data[] = '你好,哈哈!'; $data[] = '没什么~ 梦_1243的'; d($data); $cipher = new TZ_Mcrypt($key); foreach ($data as $v) { $n[] = $cipher->encode($v); } d($n); $cipher2 = new TZ_Mcrypt($key); foreach ($n as $v) { $o[] = $cipher2->decode($v); } d($o); //$cipher3 = new TZ_Mcrypt($key); //d($cipher3->decode('Tdl4CAKwkZ1sMfk9ty4moY6mfJFJHGk2xbD2ghkXlFX8i8YpFvtpYee1dL5n6Gqb')); TZ_Request::send(array()); }