Ben bir C++ program ve outputs it yürüten aşağıdaki kodu var:
<html>
<head>
<title>C++</title>
</head>
<body>
<div><?php
system("app.exe", $out);
echo rtrim($out, "0");
?></div>
</body>
</html>
you can pass arguments to the c++ program, böyle demek ki nasıl bunu yapabilir ...
Bu c++ programı olsaydı
#include <iostream>
#include <string>
int main(){
string input = getarg();//Not really a function, just one I kinda want to know
cout << input;
return 0;
}
Could I do something like this?
<html>
<head>
<title>C++</title>
</head>
<body>
<div><?php
system("app.exe arg=hello-world", $out);
echo rtrim($out, "0");
?></div>
</body>
</html>
I don't know bu soruna parçaları bir yeri, I can execute the program ama ben sadece need to pass arguments.