当我尝试获取数据库表的备份时,我遇到了上述错误问题。请检查
$table_name = "back_up_manager";
$backup_file = "/var/www/html/solaris_dev/uploads/back_up_manager".date('F h:i:s').".csv";
$sql = "SELECT * INTO OUTFILE '$backup_file' FROM $table_name";
$command = Yii::$app->db->createCommand($sql)->queryAll();
答案 0 :(得分:0)
张这部分代码
$sql = "SELECT * INTO OUTFILE '" . $backup_file. "' FROM " .$table_name;
在您的示例中,$sql
变量包含无效的文件路径。