private function control() { if ($this->control !== NULL) { return $this->control; } $v = apcfetch($this->ctrlkey()); if ($v === FALSE) { $v = new ApcListControl(); apcstore($this->ctrlkey(), $v); } $this->control = $v; return $v; }
public function fetch($key) { return apcfetch($this->value_key($key)); }
// 网页访问 都是老师访问,需要检查SESSION if (CHECK_SESSION) { checksession(); } if (CHECK_ADMIN_PERMISSION) { $result = checkAdminPermisson(); if (!$result) { operation_fail("你没有管理员权限"); } } if (GIANT_LOCK) { giant_lock(); } $__script_start_time = microtime(true); if (CHECK_IMEI) { $ban_imeis = apcfetch("BAN_IMEIS"); if (!$ban_imeis) { $ban_imeis = array(); $data = db_fetch_all("select imei from ban_phone"); foreach ($data as $e) { $imei = $e["imei"]; $ban_imeis[$imei] = 1; } } $_imei = imei(); $_ip = getIp(); if (isset($ban_imeis[$_imei]) || isset($ban_imeis[$_ip])) { operation_fail("hello" . $_imei . language_message("ban_imei")); } } if (FORBID_VIRTUAL_MACHINE) {
<?php require_once '../common/__html__.php'; require_once '../common/common.php'; require_once '../common/page.php'; //$openid = $_SESSION['openid']; //$access_token = $_SESSION['access_token']; $token = apcfetch("ACCESS_TOKEN"); $access_token = $token->access_token; $mediaId = param('headerMediaId'); //$url = "https://qyapi.weixin.qq.com/cgi-bin/media/get?access_token=$access_token&media_id=$mediaId"; $url = "http://file.api.weixin.qq.com/cgi-bin/media/get?access_token={$access_token}&media_id={$mediaId}"; $curl = curl_init(); curl_setopt($curl, CURLOPT_HEADER, 0); curl_setopt($curl, CURLOPT_NOBODY, 0); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_TIMEOUT, 500); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($curl, CURLOPT_URL, $url); $res = curl_exec($curl); $info = curl_getinfo($curl); curl_close($curl); print_r($info);
function apc_hit_rate() { $rec = apcfetch("APC_HIT_RATE"); if ($rec == FALSE) { return 0; } else { return $rec; } }
function profile_average_lock_time() { $lc = apcfetch("LOCKTIME"); return $lc[0] / $lc[1]; }