Hi,
I want to compile a C/C++ file from php script and generate an error file in Windows 7. I am using MinGW32 as C compiler whose path is included in Environment variables (PATH='C:\MinGW32\bin') and WAMP 2.2. Tried using the below php scripts, error file is generated but it is empty ($ferr.err is 0kb).
// Type 1
echo `gcc -o $fexe $fsource 2> $ferr.err`;
// Type 2
$command = "gcc -o $fexe $fsource 2> $ferr.err";
$result = shell_exec($command);
// Type 3
system("gcc -o $fexe $fsource 2> $ferr.err");
What is the reason? How to solve this problem?
----
Thanks in advance..