Fatal error Class 'Tidy' not found with Wamp + PHP 5.5.12

Asked

Viewed 108 times

0

On a project I’m working on in my current job, I came across some problems that are really giving me a headache:

inserir a descrição da imagem aqui

Follows code line of the file TransformDoc.inc.php

public function validatorXHTML()
{

    ob_start();
    ?>
    <html>a html document</html>
    <?php
    $html = ob_get_clean();

    // Specify configuration
    $config = array(
               'indent'         => true,
               'output-xhtml'   => true,
               'wrap'           => 200);

    // Tidy
    $tidy = new tidy; //Linha 315(ERRO)  
    $tidy->parseString($html, $config, 'utf8');
    $tidy->cleanRepair();

    // Output
    echo $tidy;

}

Line 315:

$Tidy = new Tidy;

1 answer

0

Suppose you are using Wampserver 2.0. With it already open (running) you just need to follow this path and click on the Wamp Server icon with the right mouse button on your system tray>PHP>PHP Extensions>php_tidy, as shown in the figure:

em seguida, ir PHP> extensões PHP e clique em php_tidy

Once this is done, the class will be enabled in PHP.ini

If there are any doubts, please do not fail to question.

abs

Browser other questions tagged

You are not signed in. Login or sign up in order to post.