Help php exec, system function for compile javac or java
Can anyone have this experience to use php code to call external compiler to compile program e.g:
<?php
exec("javac $filename > error.txt");
exec("java HelloWorld > output.txt");
?>
I can compile the program on window platform but not in linux.
In window, it works.
In linux, the result the is nothing. [not compile the program and no output also]
Anyone have this experience before ??
I would like to know how to call a compiler using php [any setting on linux or apache or php]??
Thx.
|