usually used to make installers, data backup programs to use this code, I see there are not too many, and some are not very good use, sometimes this code can be used directly to save a lot of time, then I from the stackov Erflow has turned one. The required friends can refer to the following
code as follows:
[code].lt;? Php
/ / / / Name of the file
$filename ='churc.sql'; />$mysql_password = '';
/ / / / / / Database name
$mysql_database ='dump';
/ / Connect to MySQL server
/ / Temporary variable. 's a comment
if (substr ($line, 0, 2) = = '$line = =')
continue;
/ / / / / / / > = = '='; The query
mysql_query ($templine) or print ('Error performing query \'.lt; strong.gt; $templine. >?.gt; [/code]