пожалуйста, есть кто-нибудь, кто знает, как установить и использовать PEAR Cache Lite?Я пытаюсь создать этот маленький код, но он вернул ошибку:
Класс 'PEAR' не найден в /var/www/vhosts...../Cache/Lite.php
, зная, что у меня установлена груша на моем выделенном сервере (Kernel red hat 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();
}
сердечно.