$static = $title_parse.".php"; $title_parse .= ".tmp"; $o[title] = str_replace('\'', '\\', $o[title]); echo "$count1, "; $handle = fopen($regen."$title_parse", "w") or die("Unable to create $title_parse!"); $header = ""; fwrite($handle,$header); fclose($handle); $ctime=time(); mysql_query("UPDATE `story` SET static='$static',lastregen=$ctime WHERE id=$o[id] LIMIT 1"); } echo "

Done!

"; }