Solved

PHP/C++ Interaction

Posted on 2006-10-23
1
253 Views
Last Modified: 2010-08-05
Although I've done a fair amount of web programming, this will be my first dive into PHP waters.  I need to build a basic front end that has a browse feature for files and accepts some other basic input.  The tricky part that I'm not sure about involves sending the input as parameters to a C++ program running in the background.  Are there any tutorials floating around that could walk me through how to do this interface in PHP?  Is there a way to incorporate C++ code directly into PHP to do file parsing on the client-side?  

They're basic questions, but I figure it's better to get pushed in the right direction rather than stumble around in the dark looking for the doorknob.  Thanks for your help.

Jason
0
Comment
Question by:cdromes
1 Comment
 
LVL 20

Accepted Solution

by:
virmaior earned 175 total points
ID: 17791339
(1) you could probably find file browsing systems in php on sourceforge
(2) "file parsing on the client-side" for c++ code doesn't make sense with the way php runs.  PHP produce web pages that get parsed by the end users browser
(3) you can get PHP to interact with your code in a number of ways:
   (a) you could compile an extension and then your code would run directly in php with the functions you wrote (though i don't know anyone who does this)
   (b) if you're running windows, you can make your DLL a COM object provider
   (c) you can exec the code and then take its output using the function passthru()  (see http://www.php.net/manual/en/ref.exec.php for an overview of php program running functions).


0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
What does != "" mean in programming 8 78
jQuery Toggle & Anchor Links 5 43
AJAX, If No returns don't let the AJAX Call run again 2 20
Ajax and PHP 9 29
Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to count occurrences of each item in an array.

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question