Page 1 of 1

Using DLL

Posted: Tue Nov 13, 2007 7:00 am
by N1gel
Hi

Is it possible to load a C++ DLL from PHP using dl().

I have been looking at the manual and am trying to use. dl()

In my code at the line

Code: Select all

dl("dll_geodetics.dll");
I am getting the error message
Warning: dl() [function.dl]: Invalid library (maybe not a PHP library) 'dll_geodetics.dll' in... e.t.c
Is there something i have to do to make my DLL a PHP library or extension.

I would be greatfull for any help

Thanks

Nigel

Posted: Tue Nov 13, 2007 10:46 am
by feyd
As you have found, dl() is for PHP libraries only.

You will need to recompile the DLL using PHP's libraries. There are many pages about creating PHP extensions available. Please search them out.