. Overview:
Alternative PHP cache (APC) is a free, publicly available, optimized code cache for PHP. It is used to provide free, open and robust architecture to cache and optimize PHP's intermediate code.
Note:
1. Under Windows, APC needs to have a temporary path, and the Web server has writable permissions. It checks the TMP, TEMP, and userprofile environment variables sequentially, and if they are not set, the Windows directory is used at the end.
2. APC does not support distribution.
II. Installation:
Download the pecl DLL package from pecl4win.net.php and put it in the Php5/ext directory. In fact, the php5.2.5 corresponding PECL package already contains this file.
III. Configuration
Open php.ini, add code:
Extension=php_apc.dll
[APC]
apc.enabled = 1
Apc.shm_segments = 1
Apc.shm_size = 64
Apc.max_file_size = 10M
Apc.stat=1
Iv. Script test:
To restart the Web server, test:
1). Set the entries to be cached.
store.php
$bar = ' Bar ';
Apc_store (' foo ', $bar);
?>
2). Gets the cached entry.
fetch.php
Var_dump (Apc_fetch (' foo '));
?>
Run store.php, then run fetch.php to see the effect.
http://www.bkjia.com/PHPjc/478711.html www.bkjia.com true http://www.bkjia.com/PHPjc/478711.html techarticle . Overview: Alternative PHP cache (APC) is a free, publicly available, optimized code cache for PHP. It is used to provide free, open and robust architecture to cache and optimize PHP's intermediate code. ...