Home > php教程 > php手册 > PHP使用mysqldump命令导出数据库

PHP使用mysqldump命令导出数据库

WBOY
Release: 2016-06-06 20:04:51
Original
1587 people have browsed it

最近用php写一个数据备份的功能。做法是使用php的system函数执行mysqldump命令,进行备份,这里分享给大家,有需要的小伙伴可以参考下。

PHP使用外部命令导出数据库,代码很简单,就不多废话了

$dumpFileName`;   $hd = fopen($dumpFileName, 'rb');   echo fread($hd, filesize($dumpFileName));   fclose($hd); ?>

以上就是本文所述的全部内容了,希望大家能够喜欢。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template