i have the code to upload xml file using dom.
if (!$dom->load($folderName . "/" . $fvalue)) {
echo "<br>".$fvalue." file is corrupt or Tags are not closed properly ";
}
it uploads the file BUT after uploading, there are 3 whitespaces in the start of the file before any xml Tag. Problem is we download uploaded file and upload again. but with whitespaces in the start of the file, dom dont allow to upload the file as it is corrupted.(i check the validation of xml using xmlvalidation.com) which returns error because there are spaces at the start. if i remove space manually than no error.
How i can upload the file without adding spaces at the start ?
I checked to remove spaces from file etc. but i dont want to do that. i want to upload the file without changing.