Jump to content

Using Pear Functions


mklappen
 Share

Recommended Posts

Hi

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.

 

I'd like to use the File_SearchReplace() function but I'm not where this module is located on the server to make the

require_once 'File/SearchReplace.php'; or include statement.

 

http://pear.php.net/manual/en/package.file...archreplace.php

 

Thanks

Mike

Link to comment
Share on other sites

This post may help.

Thanks, I've added the following to my script but I still get an error:

<?php

ini_set('include_path', "/usr/local/bin/pear". ini_get("include_path"));

require_once ('File/SearchReplace.php');

...

 

?>

 

Error:

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

 

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

 

Thanks

Mike

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...