Jadual Kandungan
source 命令无法使用?
Oct 19, 2016 am 10:40 AM
mysql
php
无法导入???
<code>You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'source D:\Server\three\public\export.sql' at line 1</code>
Salin selepas log masuk
Salin selepas log masuk
function ImportDB($dbh) { $sql = 'source '.realpath('export.sql'); try { $stmt = $dbh->prepare($sql); var_dump($stmt->execute()); var_dump($stmt->errorInfo()); } catch (PDOException $e) { print $e->getMessage(); } }
Salin selepas log masuk
Salin selepas log masuk
注:导入包没问题: