Re: return C++ string to PHP var?
| From: | Stut | Date: | Fri, 14 Nov 2008 09:47:31 +0000 |
| Subject: | Re: return C++ string to PHP var? | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-29078@lists.php.net to get a copy of this message | ||
On 14 Nov 2008, at 01:51, Albus Dumbledore wrote:
I have to create a data access layer (DAL) to be used in PHP. It looks like writing a COM object and loading it from PHP would be the best bet. Question 1: Is COM the best solution here?COM would be one way to go, or you could write it as a PHP extension.
Question 2: if I had an interface "char* query("Blah")" How would I return the result set into a PHP var?If using COM just return it from the COM method as a bstr. COM/PHP will do what it needs to in order to give that to the caller as a PHP string.
Question 3: Anyone know of a good tutorial that creates a COM object and accesses it via PHP?Never seen one, it's not what you might call a "normal" thing to do. My friend Google knows a lot of stuff, it might know about this too. -Stut -- http://stut.net/