更新时间:2023-11-30 20:05:40
不要重新发明***。您所需要的已经存在的几乎是现成的:
Do not reinvent the wheel. What you need already exists almost out-of-the-box:
<?php
$result = exec("/path/to/mysqldump -u$username -p$password your_database your_table > /desired/output/path/dump.sql");
您可能想检查 $ result
afterwads,以确保一切顺利。
You may want to check the contents of $result
afterwads, to make sure everything went smooth.