PHP ile bir C Kodu derlemek çalışılıyor

0 Cevap php

I have a file named gcc.exe and I have a php page... I want to use:

gcc test.c

And, if there's some compilation error, I want to show it on the php page... But I can't. What happens is: If the file is correct, it generates the .exe file, but if it's wrong, nothing happens. What I want here, again, is to show all errors.

Herkes bir fikri var?

Edit[1]: Some code:

<?php
exec("gcc teste.c",$results);
print_r($results)
?>

Çıktı:

*Nothing*

Edit[2]: I tryed put gcc output on a text file: This way (on prompt):

gcc test.c > teste.txt

Teorically, everythings on the screen go to text file. But this was unsucessfuly!



Edit[3]: quantumSoup: I tryed it, and...

array(0) { } int(1)

Hiçbir şey ... Daha fazla bir şey?

0 Cevap