I have a file that I use to upload XML files to my webserver using PHP but I have problem with some XML files and I would like to change its coding from utf-8
to ISO-8859-1
before upload that file, is this possible with a native php function or I need to do that from scratch?
I mean to read the file before upload change that part with str_replace
maybe and then save the xml file?
This is part of my code
if (move_uploaded_file($pic['tmp_name'], $upload_dir.$pic['name'])) {
$xml = simplexml_load_file($upload_dir.$pic['name']);
It should be before the if statement, what do you think?