我需要使用系统php函数导入数据库

I have a script that exports database using the system function.

$command = "c:\\xampp\\mysql\\bin\\mysqldump --opt -uuser -ppassword-  --databases movies --result-file=export.php";
system($command);

I need to know the equivalent to import a database.

I am using xampp and windows 8

I use something like this, with a mysqli object

$sql = file_get_contents('location/of/import.sql');
if($conn->multi_query($sql)){
    while($conn->more_results() and $conn->next_result()){
        ;
    }
};