简体   繁体   中英

Save mysql query results to HTML file in PHP

I want to save 20-30 MySQL query results to .html files separately.

$query = mysqli_query($link, "SELECT....")
while ($t = mysqli_fetch_assocc($query)) {
    // The other queries and html content** <- I want to save these.
}

So I want to save the result, not the source code, I think it should execute and then a script save it to html, because in the future I want to open it.

您可以使用file_put_contentsfwrite

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM