note 42469 added to ref.tidy
| From: | mikemindel at wordtracker dot com | Date: | Tue, 18 May 2004 09:20:30 +0000 |
| Subject: | note 42469 added to ref.tidy | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-69747@lists.php.net to get a copy of this message | ||
After some difficulty, I managed to get the PECL extension going on 4.3x. Here are my observations:
INSTALLATION OF TIDY FOR PHP 4.3X (CLARIFICATION)
1. Get libtidy source from http://tidy.sourceforge.net/src/tidy_src.tgz.
Run the following commands to unpack and install:
tar -zvxf tidy_src.tgz
cd tidy/build/gmake
make all
make install
2. Download Tidy as Pecl extension directly from http://pecl.php.net/get/tidy-1.0.tgz. Run the
following commands to unpack and install:
tar -zvxf tidy-xxx.tar
cd tidy-xxx
phpize
./configure && make && make install
3. Add extension=tidy.so to your php.ini file and restart Apache. Then you should see...
tidy
Tidy support enabled
libTidy Build Date 1st May 2004
Directive Local Value Master Value
tidy.default_config no value no value
.
in your phpinfo();
HOW USEFUL IS TIDY IN 4.3X AS OPPOSED TO PHP >= 5.X.X
As far as I can tell, many of the tidy functions are not available in 4.3X. Since the ability to
traverse the HTML document with tidy_node is only available in PHP >= 5.0.0, the only useful
functions in PHP 4.3x seem to be:
tidy_parse_string($html);
tidy_clean_repair();
$clean_html = tidy_get_output();
Hope that helps someone.
Mike Mindel
----
Manual Page -- http://www.php.net/manual/en/ref.tidy.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+42469
Delete -- http://master.php.net/manage/user-notes.php?action=delete+42469&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+42469&report=yes
Search -- http://master.php.net/manage/user-notes.php