PHP字符串比较VIEW DIFF PEAR

时间:2011-09-08 18:46:03

标签: php string pear

我正在尝试比较两个字符串,我想知道字符串1中的某些内容是否被删除或替换为字符串2。

我尝试使用以下内容: http://pear.php.net/manual/en/package.text.text-diff.intro.php http://www.raymondhill.net/finediff/viewdiff-ex.php

但我无法让它发挥作用。

1 个答案:

答案 0 :(得分:0)

http://pear.php.net/manual/en/package.text.text-diff.usage-examples.shell.php还不够吗?

如果安装了Text_Diff软件包,您还将自动安装一个示例:

$ pear list-files text_diff|grep doc
doc  /usr/share/php/docs/Text_Diff/docs/examples/1.txt
doc  /usr/share/php/docs/Text_Diff/docs/examples/2.txt
doc  /usr/share/php/docs/Text_Diff/docs/examples/diff.php