中国真实偷乱视频,东京道一本热中文字幕,久久精品国产99国产精品亚洲,欧美激情一区二区三区在线

Board logo

標題: [求助] 一個Memcache測試腳本,但顯示沒安裝Memcache [打印本頁]

作者: 小哈    時間: 2014-2-21 17:14     標題: 一個Memcache測試腳本,但顯示沒安裝Memcache

<?php
$loop = 10000;
echo 'loop : ';
echo $loop*5;
$mcd = new Memcached;
$mcd->addServer('127.0.0.1', 11211);
$mcd->set('test/key/1', 'test/key/1',360000);
$mcd->set('test/key/2', 'test/key/1',360000);
$mcd->set('test/key/3', 'test/key/1',360000);
$mcd->set('test/key/4', 'test/key/1',360000);
$mcd->set('test/key/5', 'test/key/1',360000);
echo '<br>';
echo 'Memcached : ';
$start = microtime(true);
for ($i = 0; $i < $loop; ++$i) {
    $mcd->get('test/key/1');
    $mcd->get('test/key/2');
    $mcd->get('test/key/3');
    $mcd->get('test/key/4');
    $mcd->get('test/key/5');
}
echo microtime(true) - $start, "s.<br>";

$mc = new Memcache;
$mc->pconnect('127.0.0.1', 11211);
echo 'Memcache : ';
$start = microtime(true);
for ($i = 0; $i < $loop; ++$i) {
    $mc->get('test/key/1');
    $mc->get('test/key/2');
    $mc->get('test/key/3');
    $mc->get('test/key/4');
    $mc->get('test/key/5');
}
echo microtime(true) - $start, "s.<br>";

?>

運行結(jié)果
oop : 50000
Fatal error: Class 'Memcached' not found in /www/web/public_html/mct.php on line 5




歡迎光臨 WDlinux官方論壇 (http://ahbydz.com/bbs/) Powered by Discuz! 7.2