hello i would like to know how would it be possible to create a manual php header example
header("Content-Disposition: form-data; name=\"$fieldname\"; filename=\"$filename\");
instead of using that i would like to create manual it as
$senddata = "开发者_运维技巧Content-Disposition: form-data; name=\"$fieldname\"; filename=\"$filename\"".$nn;
This:
ob_start();
$senddata = "Content-Disposition: form-data; name=\"$fieldname\"; filename=\"$filename\"".$nn;
header($senddata);
but make sure that you have constructed the valid header.
ob_start();
.... other stuff ....
$senddata ="Content-Disposition: form-data; name=\"$fieldname\"; filename=\"$filename\"".$nn;
header($senddata);
?
If you need to get the fieldname and filename and some data is outputted before, you can look into output buffering
精彩评论