沃梦达 / 编程问答 / php问题 / 正文

使用 PEAR 包 Horde_Text_Diff

Using PEAR package Horde_Text_Diff(使用 PEAR 包 Horde_Text_Diff)

本文介绍了使用 PEAR 包 Horde_Text_Diff的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了 Horde_Text_Diff,它取代了 Text_Diff.这就是问题所在:当我尝试使用它时,它给了我:

I installed Horde_Text_Diff, which supersedes Text_Diff. Here's the problem: when I try to use it, it gives me:

Class 'Horde_Text_Diff_Engine_Native' not found

我查看了文件,看起来有十五个左右的类相互依赖,并且没有一个文件相互包含.我必须手动执行此操作吗?同样,大约有 15 个文件.

I looked at the files, and it looks like there are fifteen or so classes that depend on each other, and none of the files include each other. Do I have to do this manually? Again, there are about fifteen files.

PEAR 包应该是这样工作的吗?

Is this how PEAR packages are supposed to work?

推荐答案

您需要使用与 PSR-0 兼容的自动加载器,该自动加载器会在包含路径中可用时自动包含类.Horde 提供了一个,Horde_Autoloader.

You need to use a PSR-0 compatible autoloader that automatically includes classes when they are available from your include path. Horde provides one, Horde_Autoloader.

这篇关于使用 PEAR 包 Horde_Text_Diff的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:使用 PEAR 包 Horde_Text_Diff

基础教程推荐