Database Restore Problems...
Posted: Mon Nov 03, 2003 1:55 am
I am trying to create a script that will backup and restore the tables. The backup part works fine it's just when I go to restore, it does a certain amount of rows and then cuts out. There must be about 1300 rows with a lot of information in each(Sort of like a phpbb form post)
I have added a @set_time_limit(0); at the top of the page but that doesn't do anything...
Here is my restore code:
Is there a way to stop it cutting out?
I have added a @set_time_limit(0); at the top of the page but that doesn't do anything...
Here is my restore code:
Code: Select all
<?php
$dump = @file($_FILES['userfile']['tmp_name']);
@unlink($_FILES['userfile']['tmp_name']);
$count = count($dump);
for ($i=0 ;$i<$count ;$i++) {
if (!trim($dump[$i])) continue;
if (ereg("^#",$dump[$i])) continue;
$content = str_replace(";\n","\n",$dump[$i]);
mysql_query($content);
}
?>