mysql_select_db"database";
$result=mysql_queri"select*from$table";
ifmysql_num_row$result<=0exit;
echo"开始转换数据到文本...
";
$handl=fopen"$table.txt","w";
$numfield=mysql_num_field$result;
fput$handle,$numfields."\r\n";
for$k=0;$k
{
$msg=mysql_fetch_row$result;
for$i=0;$i<$numfields;$i++
{
$msg[$i]=str_replac"\r\n","&&php2000mysqlreturn&&",$msg[$i];
$msg[$i]=str_replac"\n","&&php2000mysqlreturn&&",$msg[$i];