Changed thread title to better describe the problem (did you know that threads whose titles contain phrases such as 'why does this not work?' actually get FEWER responses?).
Heya, Tanya.
So what seems to be the problem?
thanks for your answer and the title.
I will describe the problem as much as I can.
firstly, when I execute the script : get_station_dat a on some files( they are GRIB files used in Meteorology ) to get a output file , whose record is like :
2007030412 0 545 0.000000E+00
# Date ID 2010010000
no problem executing the script in a terminal.
because of some reason, I need to execute this script in php.
the code I use (php) is :
chdir("../file"); --change the current dir to the one containing all GRIB files.
$cmd="./get_station_dat a";
shell_exec($cmd );
or
chdir("../file");
$cmd="./get_station_dat a";
exec($cmd);
the result is :
the output files are created , but nothing in it ( should be something there ! )
I just wonder is there anything extra to be done in php to generate & edit a output file instead of just echo the result in a web page .
Looking forward to your answer !
thanks
Tanya