php passthru
Posted: Tue Jan 24, 2012 5:06 am
i have a c++ file, compiled it into a .exe..
now, i want to run this using passthru and pass some input for int a..
i'm using this:
but this isnt working.. i'm getting garbage value.. any idea why ??
Code: Select all
#include<iostream>
#include<stdlib.h>
#include<conio.h>
using namespace std;
int main()
{
int a;
cin>>a;
cout<<a;
return 0;
}
i'm using this:
Code: Select all
echo passthru('2.exe && 5');