Re: C++ integration with PHP
| From: | Toby Butzon | Date: | Fri, 02 Feb 2001 01:12:35 +0000 |
| Subject: | Re: C++ integration with PHP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-37767@lists.php.net to get a copy of this message | ||
Yes, system() waits for the called program to terminate before PHP
execution continues, so that should work.
However, you may also want to look into building a custom module for PHP
so you can call your C functions directly from PHP. Info on the Zend
API, building PHP modules in C, etc., is available at Zend.com.
--Toby
Zhu George-CZZ010 wrote:
>
> Does anyone know how to integrate C++ and PHP if there are some data changes between PHP
> program and C++ program?
>
> What I can think about is: in PHP, put the data in a file, and use "system" call to
> activate the c++ program. After that, let the c++ program to read the data file, and output the
> result into another file, and let the PHP to read the result file.
> But there is one question: will php wait until C++ program finish if I use "system"
> function from PHP?
>
> Is there any better way to do the integration?
>
> Thanks,
> G.Z.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net