// Should be save here because file_exists() is there but we check it again. :)
$file = secureString($_POST['spath']) . "install/" . $dump;
if (FILE_READABLE($file)) {
- // Load the file
- $sql = implode("", file($file));
-
- // Remove some unwanted chars
- $sql = str_replace("\r", "", $sql);
- $sql = str_replace("\n\n", "\n", $sql);
+ // Read the file
+ $SQLs = READ_FILE($file, true);
// And split it up against ;\n ...
$SQLs = merge_array($SQLs, explode(";\n", $sql));