安装 Html Tidy

发布于 2024-07-16 07:29:06 字数 382 浏览 4 评论 0原文

我正在运行 Mac OS X 和 Apache/2.0.59 (Unix) PHP/5.2.5 DAV/2。 我以前从未管理过 Apache 或 PHP,所以有些事情对我来说并不是那么明显。

我正在尝试让 PHP Tidy 按照此处所述运行 http://th .php.net/manual/en/tidy.installation.php

它说我需要“在 PHP 5 中,您只需要使用 --with-tidy 选项进行编译。” 但我只是不明白如何做到这一点,这是在尝试谷歌搜索 1 小时之后!

请帮助!

I'm running Mac OS X with Apache/2.0.59 (Unix) PHP/5.2.5 DAV/2. I've never administered Apache or PHP before so somethings aren't really that obvious to me.

I'm trying to get PHP Tidy to run as mentioned here http://th.php.net/manual/en/tidy.installation.php

It says I need to "In PHP 5 you need only to compile using the --with-tidy option." but I just don't understand how to do this and this is after 1 hour of trying to googling it!

Help please!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

原野 2024-07-23 07:29:06

转到此处开始 http://us.php.net/manual/en/install .php。 另请考虑 这个这个这个

您需要阅读如何编译 PHP。 它是通过命令行完成的,因此如果您对此感到不舒服,请小心。 另请注意,在 Mac 上编译的细节非常详细,一个小小的失误就会导致安装失败。

由于您使用的是 Mac,请查看 Marc Liyanage 的软件包(尽管我不知道他们是否配置了 Tidy)。 还可以考虑使用 MacPorts 来完成所有这些操作(对于确保安装所有依赖项特别有用)。 如果您必须从头开始,请理解您确实需要知道自己在做什么。

顺便说一下:

基本过程是配置、制作、安装。

以下是一些示例配置(请勿使用这些路径。路径特定于某些安装,您将拥有不同的路径。这只是为了向您展示配置的外观):

./configure --with-mysql =/Applications/MAMP/Library --with-apxs2=/Applications/MAMP/Library/bin/apxs --with-gd --with-jpeg-dir=/Applications/MAMP/Library

。 /configure --prefix=/usr/local/apache2/php --with-zlib --with-xml --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local /mysql

因此,您需要将 --with-tidy 添加到该列表以及 您需要/想要的任何其他配置选项

这是另一个显示 make 和 make install 的示例(注意末尾的 --with-tidy):

./configure --prefix=/usr --sysconfdir=/etc --localstatedir= /var --mandir=/usr/share/man --infodir=/usr/share/info --with-apxs2=/usr/sbin/apxs --with-curl --with-gd --enable-exif - -enable-fastcgi --enable-zip --with-ldap=/usr --with-kerberos=/usr --with-zlib=/usr --enable-ftp --enable-sockets --with-iodbc=/ usr --with-config-file-path=/etc --with-openssl --with-xmlrpc --with-xsl=/usr --with-tidy=/usr/bin/tidy

make

sudo make install

阅读本文并准备好必须执行多次才能正确(整个过程也需要一段时间)

Go here to get started http://us.php.net/manual/en/install.php. Also consider this, this and this.

You will need to read up on how to compile PHP. It is done from the command line so if you aren't comfortable with that, be careful. Also be aware that the specifics for compiling on the Mac are very detailed and one tiny slip results in a hosed install.

Since you are on a Mac look at Marc Liyanage's packages (though I don't know if they have Tidy configured). Also consider using MacPorts to do all of this (especially useful for making sure you have all dependancies installed). If you must do it from scratch please understand that you really need to know what you are doing.

That out of the way:

The basic process is to configure, make, make install.

Here are some sample configurations (do NOT use these. The paths are specific to certain installations and you will have different ones. This is just to show you what the config can look like):

./configure --with-mysql=/Applications/MAMP/Library --with-apxs2=/Applications/MAMP/Library/bin/apxs --with-gd --with-jpeg-dir=/Applications/MAMP/Library

./configure --prefix=/usr/local/apache2/php --with-zlib --with-xml --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql

So you would need to add --with-tidy to that list along with any of the other config options you need/want.

Here is another example showing make and make install (notice --with-tidy at the end):

./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --mandir=/usr/share/man --infodir=/usr/share/info --with-apxs2=/usr/sbin/apxs --with-curl --with-gd --enable-exif --enable-fastcgi --enable-zip --with-ldap=/usr --with-kerberos=/usr --with-zlib=/usr --enable-ftp --enable-sockets --with-iodbc=/usr --with-config-file-path=/etc --with-openssl --with-xmlrpc --with-xsl=/usr --with-tidy=/usr/bin/tidy

make

sudo make install

Read up on this and be prepared to have to do it several times to get it right (the whole process takes a while, too)

白况 2024-07-23 07:29:06

您还可以考虑使用适用于 OS X 的预编译 php-tidy 模块。它与 Zend IDE 等项目一起打包。
如果您还没有准备好访问此类项目,请从此处下载:http://projectbee.org/blog/archive/download-php-tidy-extension-for-mac-os-x/

You might also look at using a pre-compiled php-tidy module for OS X. It comes packaged with projects like Zend IDE.
In case you don't have ready access to such a project, download it from here: http://projectbee.org/blog/archive/download-php-tidy-extension-for-mac-os-x/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文