Visa ett inlägg
Oläst 2012-04-24, 14:51 #14
nosnaj nosnaj är inte uppkopplad
Har WN som tidsfördriv
 
Reg.datum: Mar 2005
Inlägg: 1 012
nosnaj nosnaj är inte uppkopplad
Har WN som tidsfördriv
 
Reg.datum: Mar 2005
Inlägg: 1 012
Om du bara ska ändra från APC till xcache och bibliotek osv är upsatta är det ju bara några få rader i funktionen request_cache som ska modifieras.
Med stor chans att det inte fungerar borde det vara i stil med nedanstående kod, jag har aldrig användt xcache själv men du kan ju testa

function request_cache($url, $ttl)
{
if(!xcache_isset($url))
{
$session = curl_init($url);
curl_setopt($session, CURLOPT_RETURNTRANSFER,true);
$finance_data = curl_exec($session);
$phpObj = json_decode($finance_data);

#$phpObj = file_get_contents($url);
if ($phpObj === false) return false;
xcache_set($url,$phpObj, $ttl);
}

$phpObj = xcache_get($url);

return $phpObj;
}
nosnaj är inte uppkopplad   Svara med citatSvara med citat