Re: Use of dl()

From: Date: Sat, 04 Aug 2001 08:36:27 +0000
Subject: Re: Use of dl()
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-1286@lists.php.net to get a copy of this message
["Graeme Merrall" <graeme@inetix.com.au>] > What's the story of using something like dl() in PEAR scripts. Is it an > option? > > Also, I know it doesn't work under some servers, can anyone tell me what > they are? I think it's a pretty small list. If you need to load extension libraries, dl() is your only option now, there are no problems doing that from PEAR scripts, but you should of course document this dependency. My main gripe with dl() is that you need to know the ".dll" or ".so" extension on your platform. That leads to a bunch of ugly code like this: if (!function_exists('foo_bar')) { if($WINDIR) { dl("php_foo.dll"); } else { dl("foo.so"); } } We should have this instead: php_load_extension('foo'); - Stig -- Stig Sæther Bakken <ssb@alltheweb.com> Fast Search & Transfer ASA, Trondheim, Norway

« previous php.pear.dev (#1286) next »