Forum Moderators: coopster

Message Too Old, No Replies

dynamically load the library

         

babloo

10:12 am on Jun 26, 2004 (gmt 0)

10+ Year Member



Could some one please help me out with this.

I need to dynamically load one library through php without installing.

Like for eg. I have a php script and it calls a library. The filename of the library is something like "filename.so". I am running the script in freebsd. Is there anyway that I can specify the path to the library in the script.

Thanks.

jatar_k

9:40 pm on Jun 26, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



if you have control over the scipt you can construct the path and then use it in your include call.

Hard to give you the exact code since I don't know what the variable part of the path would be but

$pathtolib = "/usr/local/whatever/" . $filename . $ext;
include $pathtolib;

something like that