\nhttp://$host/".str_replace("./","",$path)."\nweekly\n0.35\n".$lm."\n\n"; } } } } return isset($output)?$output:false; closedir($handle); } /*function add_line(){ if() } */ $xml = ''; $files = ls(".", $xml); $xml .= ''; fwrite(fopen("sitemap.xml", "w"), $xml); ?>