| php-manual.net |
|
| Home | PHP Manual auf Deutsch | PHP Manual in English | PHP manuel le sur le français | Impressum |
Tidy FunctionsEinführungTidy is a binding for the Tidy HTML clean and repair utility which allows you to not only clean and otherwise manipulate HTML documents, but also traverse the document tree. AnforderungenTo use Tidy, you will need libtidy installed, available on the tidy homepage » http://tidy.sourceforge.net/. InstallationTidy is currently available for PHP 4.3.x and PHP 5 as a PECL extension from » http://pecl.php.net/package/tidy.
If » PEAR is available on your *nix-like system you can use the pear installer to install the tidy extension, by the following command: pecl install tidy. You can always download the tar.gz package and install tidy by hand: Example#1 tidy install by hand in PHP 4.3.x gunzip tidy-xxx.tgz tar -xvf tidy-xxx.tar cd tidy-xxx phpize ./configure && make && make install Windows users can download the extension dll from » http://pecl4win.php.net/ext.php/php_tidy.dll. In PHP 5 you need only to compile using the --with-tidy option. Laufzeit KonfigurationDas Verhalten dieser Funktionen wird durch Einstellungen in der php.ini beeinflusst.
Hier eine kurze Erklärung der Konfigurationsoptionen:
Resource TypenDiese Erweiterung definiert keine Resource-Typen. Vordefinierte KlassentidyNodeMethoden
Eigenschaften
Vordefinierte KonstantenFolgende Konstanten werden von dieser Erweiterung definiert und stehen nur zur Verfügung, wenn die Erweiterung entweder statisch in PHP kompiliert oder dynamisch zur Laufzeit geladen wurde. Each TIDY_TAG_XXX represents a HTML tag. For example, TIDY_TAG_A represents a <a href="XX">link</a> tag. Each TIDY_ATTR_XXX represents a HTML atribute. For example TIDY_ATTR_HREF would represent the href atribute in the previous example. The following constants are defined:
BeispieleThis simple example shows basic Tidy usage. Example#2 Basic Tidy usage
<?phpInhaltsverzeichnis
|