php - sending file (soap response) to browser instead of saving on server -
hi created php script sends soaprequest soapserver. soapserver makes file want back.
i can create file far need save on server.
here example of code:
// creating variables files receive soap server $timestamp = time(); $msgfile .= 'hpoutput/'. $timestamp . '_messagefile.txt'; $dlffile .= 'hpoutput/'. $timestamp . '_'. $array["return"]["files"]["filename"]; // saving messagefile server $var_str = var_export($array["return"]["enginemessage"], true); file_put_contents($msgfile, $var_str); // saving actual output file server $var_str = serialize($array["return"]["files"]["fileoutput"]); file_put_contents($dlffile, $var_str);
questions: - can send created file directly browser, without saving on server? - if isn't possible, how can remove (clean up) temp space?
Comments
Post a Comment