请问有谁知道如何安装和使用PEAR Cache Lite? 我尽量让这个小代码,但它返回了一个错误:PHP Cache Lite PEAR
班“梨”在/var/www/vhosts...../Cache/Lite.php
知道我有梨安装我的专用服务器上(内核红帽kimsufi)
// on fait appel a notre librairie PEAR
set_include_path(get_include_path() . "usr/share/pear");
// On charge Cache_Lite
require_once('../Cache/Lite/Output.php');
// On fixe un identifiant pour la page
$id = 'index.php';
// On définit quelques options :
// - le répertoire où seront stockés les fichiers de cache
// - la durée de vie du cache (ici 30 secondes)
$options = array('cacheDir' => '/tmp/','lifeTime' => 30);
// On crée un objet Cache_Lite_Output avec les options précédentes
$Cache_Lite_Output = new Cache_Lite_Output($options);
// Si la page n'est pas en cache...
echo "bonjour";
if (!($Cache_Lite_Output->start($id)))
{
// ... alors on lance le script original
// marque la fin du script original
$Cache_Lite_Output->end();
}
未找到
亲切。
如果您想将法语评论翻译为英文,请参阅“编辑”链接。然后查看指向格式帮助的链接,然后在右侧列中找到并按下编辑器上方的问号。 – Arjan 2011-04-08 16:46:09