mb_detect_encoding is not supposed to return null. It should either return the encoding, or false. So if you really did get null, something else is wrong.
If you don't specify the detect order yourself, you'd have to know what the value of mb_detect_order is.
Iirc, BOM is allowed but pointless for UTF-8, and at the very least not recommended due to problems that may arise from its presence. Notepad and some other windows editors uses it by default.
If BOM is the only issue, you could check for its presence and strip it before storing the rest in the DB.
As for encoding
$str = file_get_contents("8859-15.txt");
$str = iconv('ISO-8859-15', 'UTF-8', $str);
//then save to db.
I'd leave the file in its original format.