SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict dr_dumb99's Avatar
    Join Date
    Sep 2004
    Location
    Pakistan
    Posts
    304
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Can C++ code be embeded in PHP

    Hi!
    Can C++ code be embeded in PHP.

    Thanks in advance

  2. #2
    SitePoint Addict
    Join Date
    Mar 2007
    Posts
    286
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't think so but not absolutely sure. Why?

  3. #3
    An average geek earl-grey's Avatar
    Join Date
    Mar 2005
    Location
    Ukraine
    Posts
    1,403
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am not sure about C++, but you can write a PHP extension in C.

  4. #4
    SitePoint Member
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could execute a binary file written in C++ with the PHP function exec().
    You can find more information in the manual.

    EDIT: But maybe you want to get the output of the application. Then you should use passthru().

    Greetings
    aeRoot

  5. #5
    SitePoint Evangelist
    Join Date
    Aug 2005
    Posts
    453
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What do you want to do in C++ that you can not figure out how to do in PHP ?
    Computers and Fire ...
    In the hands of the inexperienced or uneducated,
    the results can be disastrous.
    While the professional can tame, master even conquer.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •