User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 427,025 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,539 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 1574 | Replies: 3
Join Date: Dec 2006
Posts: 2
Reputation: jethroalias97 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
jethroalias97 jethroalias97 is offline Offline
Newbie Poster

executing c++ code from php

  #1  
Dec 15th, 2006
hi, i'm trying to execute some c++ code from the php script in my webpage, but its not working. the best i could find was the php code below.

  1. $output = shell_exec('ls -lart program.exe');
  2. echo "<pre>$output</pre>";

here is the code of program.exe (codewarrior created program.exe from this code)

  1. using namespace std;
  2. int main()
  3. {
  4. return 7;
  5. }

when i run this the screen just says some data, like date and my host server and the program, but does not exectute the program.

i was trying to get it such that when i run the page this php script is on it says 7. thanks.
AddThis Social Bookmark Button
Reply With Quote  

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb PHP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 2:51 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC