编译.php文件,从另一个php文件中获取4个参数?

I have a script which when compiled from the terminal passing the parameters something like this "php compile.php arg1 arg2 arg3 arg4" on the terminal starts displaying the output result which is something like 1)file created 2) file inclusion. etc.

Now I am trying to use system(php compile.php arg1 arg2 arg3 arg4) from another php file, but it will not execute the php file or will not show an output.

For example i even tried to create hello.php------ and tried using system(php hello.php); but it did not output anything on the browser.

Can anyone please help me out, I am new to php. Thanks.

make sure you react on errors from the system call. Your actual code might also help. The following example works without problems on my box.

<?php

$file = fopen('/tmp/written.php', 'w');

fwrite($file, '<?php echo "Hello from written.php
"; ?>');
fclose($file);

echo "calling written.php
";
if (!system('php /tmp/written.php'))
    die("something wrong
");
else
    exit("all good
");

?>