public static function loggerFileName($domain, $ext = 'log') { $date = date('Y-m-d'); $hour = date('H'); $filePath = WZhaopinEnv::getLogDir() . '/' . $date . '/'; ensureFilePath($filePath, true); if (strlen($domain) > 0) { $filePath = sprintf('%s%s-%02d.%s', $filePath, $domain, $hour, $ext); } else { $filePath = sprintf('%s%d.%s', $filePath, $hour, $ext); } return $filePath; }
public static function getStaticFileUrl() { if (self::$staticUrl != null) { return self::$staticUrl; } $host = self::getConfig()->static_file->host; $ver = self::getConfig()->static_file->version; if ($host == null) { return ''; // $host = self::getConfig()->img->url->cdn; } if ($ver == null) { self::$staticUrl = "//{$host}"; } else { self::$staticUrl = "//{$host}/hr{$ver}"; } return self::$staticUrl; }
protected function inputRefererErrorResult() { // echo json_encode(array('code'=>-101,'desc'=>'referer error')); // haloDie(); YafDebug::log(sprintf("Illegal referer: uid is %s, referer is %s, params is %s ", WZhaopinEnv::getWid(), $_SERVER['HTTP_REFERER'], json_encode($_SERVER)), "refer_error"); $this->inputErrorResult(WrmErrorCodeManager::CLIENT_ERR_ILLEGAL_REFER); }
//Pinyin table public function __construct($mcName = 'web') { MemCacheBase::getMc($mcName); } public static function singleton() { if (self::$instance == null) { self::$instance = new MemCacheBase(); } return self::$instance; } /** * generate key * @param $ids * @param $tag * @return string