[horde] Horde/Text_Diff Include Issue

Jan Schneider jan at horde.org
Fri May 24 15:21:24 UTC 2013


Zitat von Priti Solanki <pritiatwork at gmail.com>:

> Hi All,
>
> I have installed Text_Diff bu following the steps share on portal and it
> got installed as well.
>
> I have included my pear path in include_path in php.ini
>
> Following is my code
>
> include_once "Text/Diff.php";
> include_once "Text/Diff/Renderer.php";
>
> $from_text=file("test.html");
> $to_text=file('test_edited.html');
>
> $diff = new Horde_Text_Diff($from_text, $to_text);
> $renderer = new Horde_Text_Diff_Renderer();
> echo $renderer->render($diff);
>
> As of now I am getting include error , I noticed if I add the abs URL i.e
>
> set_include_path(get_include_path() . PATH_SEPARATOR .
> 'C:\wamp\bin\php\php5.3.13\pear\Horde');
>
> then include error goes away but I get stuck with
>
> Fatal error: Class 'Horde_String' not found in
> C:\wamp\bin\php\php5.3.13\pear\Horde\Text\Diff.php on line *41*
>
> I have "String.php" under /Horde...
>
> Can someone help me what I am missing. Please
>
> Please note while installing pear didn't installed the optional dependency.
>
> Regards,
> Priti

You need to either use a PSR-0 compatible autoloader like  
Horde_Autoloader, or include all required files manually, e.g.  
"require_once 'Horde/String.php';" etc.
-- 
Jan Schneider
The Horde Project
http://www.horde.org/



More information about the horde mailing list