This commit is contained in:
wispx
2019-01-03 11:55:59 +08:00
parent b0aaa7e6a3
commit c5810f7bd7
3 changed files with 7 additions and 3 deletions
+2 -2
View File
@@ -244,8 +244,8 @@ EOT;
foreach (explode(';', $file) as $value) {
if ($value && !ctype_space($value)) {
if (!$mysqli->query($value . ';')) {
throw new Exception('数据导入失败,错误信息:' . $mysqli->error . 'sql语句:' . $value);
if (!$mysqli->query(trim($value))) {
throw new Exception('<p>数据导入失败</p><p>错误信息:<br/>' . $mysqli->error . '</p><p>sql语句:<br/>' . $value . '</p>');
}
}
}