0
当我有这个php
功能:资源ID#13试图查询结果导出为CSV
function get_download($dbmi, $getid) {
$stmt = $dbmi->prepare("CALL spStartDownload(?)");
$stmt->bind_param('i', $getid);
$stmt->execute();
$result = $stmt->get_result();
$fp = fopen('file.csv', 'w');
while($row = $result->fetch_assoc()) {
fputcsv($fp, $row);
}
fclose($fp);
$stmt->close();
echo $fp;
}
我想不通为什么它给我的资源ID#13错误。
任何帮助,非常感谢。