Jump to content

[SOLVED] Pear include


jas4

Recommended Posts

Hi looked for a seperate PEAR board but didnt see any so not sure if im posting this in the right place:

 

I've installed pear onto my windows (not my choice), installed all the packages that I need etc, the problem is that i dont have access to change the include_path so in every script I need to include something like this (i think):

 

<?php
ini_set('include_path', '~/pear/lib' . PATH_SEPARATOR
        . ini_get('include_path'));

// From PHP 4.3.0 onward, you can use the following,
// which especially useful on shared hosts:
set_include_path('~/pear/lib' . PATH_SEPARATOR
                 . get_include_path());
?>

 

so i tried both parts of this code but it doesnt seem to work, has anyone else had any of these problems and solved them succesfully?

 

cheers

Link to comment
https://forums.phpfreaks.com/topic/68093-solved-pear-include/
Share on other sites

still not sure if this is the right place, but i've managed to solve my problem (eventually)

 

$path = "C:\path_to";
set_include_path('~/pear/lib' . PATH_SEPARATOR
                 . $path);

 

Its basically what I already had but I just needed to find the path that I needed to include.

 

For anyone needing to install pear on a shared windows host, and you dont have access to directly change the include_path, then this snipet of code needs to be used

Link to comment
https://forums.phpfreaks.com/topic/68093-solved-pear-include/#findComment-342312
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.