An alternative to php tidy?

前端 未结 4 1734
眼角桃花
眼角桃花 2020-12-09 22:15

I use php tidy to process html input in my database,

$fragment = tidy_repair_string($dom->saveHTML(), array(\'output-xhtml\'=>1,\'show-body-only\'=>         


        
4条回答
  •  一生所求
    2020-12-09 22:27

    If you are on a RedHat / CentOS / Fedora linux box and have root access to your server you can run...

    yum install php-tidy
    

    as root. Then restart apache and that should get you going.

    There may be errors about missing dependencies that need to be added but usually the above command will be all you need.

    Other distributions will have slightly different commands but something similar should be available.

    On windows you need to install it manually. Instructions can be found here... http://devzone.zend.com/article/761#Heading3

提交回复
热议问题