簡體   English   中英

通過Memcached獲取價值

[英]Get the value with Memcached

我試圖弄清楚如何使用memcached,我成功地獲得了整行,但無法弄清楚如何選擇特定的結果。

這就是我所擁有的:

 $mylink = new LTR_Links();
$memcache = new Memcache();
$memcache->connect("localhost",11211); 
$mylink->Link = $_GET['redirect'];
$res = $memcache->get($mylink->Link);
var_dump($res);

在這里,我得到了如下所示的結果:

object(LTR_Links)#4 (7) { ["sResult":protected]=> int(0) ["sQuery":protected]=> string(23) "select * from LTR_Links" ["sTemplate":protected]=> NULL ["sTemplateCache":protected]=> NULL ["ID"]=> string(3) "123" ["Destination"]=> string(8) "44444444" ["hasFile"]=> bool(false) }

但是我要怎么去

目的地

如果我給鑰匙,腳本就死了。 喜歡:

echo $res['Destination'];

那么到底如何獲得價值呢? 提前致謝

我的錯。 我沒有正確設置。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM