Get the latest version


Version 1.5.0 RC1

Installing memcache on Windows for PHP

Cài đặt Memcached trên Windows cho phpLemon Server

1, Download và giải nén file đính kèm vào thư mục c:\memcached.
2, Vào CMD của Windows (Start->run->cmd->enter), chạy lệnh: c:\memcached\memcached.exe -d install
3, Chạy tiếp lệnh: c:\memcached\memcached.exe -d start
4, Copy file php_memcache.dll vào thư mục PHP\ext, mặc định là: C:\Program Files\phpLemon Server\PHP\ext
5, Sửa file php.ini, mặc định là: C:\Program Files\phpLemon Server\PHP\php.ini:
thêm dòng extension=php_memcache.dll vào ngay sau: extension=php_zip.dll
6, Khởi động lại phpLemon Server.
7, Chạy thử với code sau:

<?php
    $memcache = new Memcache;
    $memcache->connect("localhost",11211); # You might need to set "localhost" to "127.0.0.1"

    echo "Server's version: " . $memcache->getVersion() . "<br />\n";

    $tmp_object = new stdClass;
    $tmp_object->str_attr = "test";
    $tmp_object->int_attr = 123;

    $memcache->set("key",$tmp_object,false,10);
    echo "Store data in the cache (data will expire in 10 seconds)<br />\n";

    echo "Data from the cache:<br />\n";
    var_dump($memcache->get("key"));
?>

Č
ċ
ď
memcached-1.2.4-Win32-Preview-20080309_bin.rar
(277k)
Huy Đậu,
Aug 4, 2010 7:44 PM