PDA

View Full Version : exec() notify when finished


davidj
09-17-2006, 10:25 AM
I am calling an exec() from PHP which runs a xls_to_csv.sh conversion program which is called on a successful upload of an xls.

straight after the call i am doing a fopen on the CSV and then writing the contents to a multi-dimensional array where i am performing an db insert with the values.

is there a switch or return i can use to determin when the xls_to_csv.sh has completed successfully and move onto the file read or do you have to keep polling through the conversion dir and look for the created file until it exists

whats the best way

domedia
09-25-2006, 07:11 PM
Guess this is the downfall of being the PHP guru on these forums , noone knows as much as you do ;-)

davidj
09-26-2006, 07:20 AM
did some testing and it appears that it waits until the conversion has complete before moving to the next part of the script anyway

ta-da