Open Source Development Tutorials | Newsletter Signup | About Us
Search  

Go Back   Open Source Tutorials Forum > Programming Languages > PHP Development
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-14-2005, 05:34 AM
sachin sachin is offline
Junior Member
 
Join Date: May 2005
Posts: 1 sachin is on a distinguished road
Question can anyone tell me How to call C++ method in PHP

Hi, I am learning PHP programming.
Is it possible to Include C++ API in PHP class and how can we call C++ method in PHP.

means how to integrate PHP and C++?
Can i know good online tutorials on PHP available on net.
Reply With Quote
  #2  
Old 05-16-2005, 08:55 PM
jpenn jpenn is offline
Super Moderator
 
Join Date: Nov 2003
Location: Washington, DC
Posts: 16 jpenn is on a distinguished road
Default

Quote:
Originally Posted by sachin
Hi, I am learning PHP programming.
Is it possible to Include C++ API in PHP class


Rather than include a C++ API in a PHP class, just build an extension to PHP in C++. By doing this, you will open up a whole new (extremely powerfull) world to PHP.

Quote:
Originally Posted by sachin
how can we call C++ method in PHP


Once your extensions are done and compiled with PHP, you would call them like any other function in PHP:

PHP Code:
 sachin_do_something();
sachin_do_somethingElse(); 


The above functions would always be available to the PHP build on the server for all domains running on that server/build.

The DBX library is a good one to look over, pretty well documented. Also, check out the tutorials on ZEND on building dynamic loadable libraries - believe the tutorial is called extending PHP.
Reply With Quote
  #3  
Old 05-03-2006, 03:54 PM
thisisme thisisme is offline
Junior Member
 
Join Date: May 2006
Posts: 2 thisisme is on a distinguished road
Default How do you create this C++ extenstion

HI Jpenn,

What is wanted to know is how do I create this c++ extension for me to open this world.

Thanks for any help.
Reply With Quote
  #4  
Old 03-18-2007, 04:03 AM
a.robert a.robert is offline
Junior Member
 
Join Date: Mar 2007
Posts: 2 a.robert is on a distinguished road
Default

hi,
I write some php extension with c++/delphi, finally I find the best way is creating apache mod, then load form apache config-file.
__________________
software reviews
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump



All times are GMT -5. The time now is 07:17 AM.


Powered by: vBulletin Version 3.0.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright 2004 - 2006 GrindingGears.com. All Rights Reserved.