Using Pear Functions

liunx

Guest
Hi <br />From reading the forums I've found that PEAR is installed on TCH servers but I'm not sure how to call from my PHP script.<br /><br />I'd like to use the File_SearchReplace() function but I'm not where this module is located on the server to make the <br />require_once 'File/SearchReplace.php'; or include statement.<br /><br /><a href="http://pear.php.net/manual/en/package.filesystem.file-searchreplace.file-searchreplace.php" target="_blank">http://pear.php.net/manual/en/package.file...archreplace.php</a><br /><br />Thanks<br />Mike<br /><br /><br /><!--content-->
This <a href="http://www.totalchoicehosting.com/forums/index.php?s=&showtopic=28529&view=findpost&p=183626" target="_blank">post </a>may help.<!--content-->
<!--quoteo(post=211133:date=Aug 16 2007, 03:19 PM:name=TCH-Don)--><div class='quotetop'>QUOTE(TCH-Don @ Aug 16 2007, 03:19 PM) <a href="http://www.totalchoicehosting.com/forums/index.php?act=findpost&pid=211133"><img src='http://www.totalchoicehosting.com/forums/style_images/1/post_snapback.gif' alt='*' border='0' /></a></div><div class='quotemain'><!--quotec-->This <a href="http://www.totalchoicehosting.com/forums/index.php?s=&showtopic=28529&view=findpost&p=183626" target="_blank">post </a>may help.<!--QuoteEnd--></div><!--QuoteEEnd--><br />Thanks, I've added the following to my script but I still get an error:<br /><?php<br />ini_set('include_path', "/usr/local/bin/pear". ini_get("include_path"));<br />require_once ('File/SearchReplace.php');<br />...<br /><br />?><br /><br />Error:<br />Warning: main(File/SearchReplace.php) [function.main]: failed to open stream: No such file or directory in /home/mysite/public_html/test.php on line 6<br /><br />Fatal error: main() [function.require]: Failed opening required 'File/SearchReplace.php' (include_path='/usr/local/bin/pear.:/usr/lib/php:/usr/local/lib/php') in /home/mysite/public_html/test.php on line 6<br /><br />Thanks<br />Mike<!--content-->
The function you are trying to call may not be on the server. Please open a ticket with the help desk and have the techs take a look. Link at top of page or in my sig.<!--content-->
 
Back
Top