INIT; fwrite( $h, $init); fclose( $h); } error_log("{$_SERVER['REQUEST_URI']}\n$dir\n",3,'123'); $data = file_get_contents( $dir); //cnv( "koi8-r", 'CP1251', $data); //cnv( "windows-1251", 'UTF-8', $data); exec('find . -type f -name "*.html"',$r); $meta_data = ""; foreach( $r as $file) { $file = preg_replace( "/^\./", "http://norse.ulver.com", $file); $file = preg_replace( "/\/index\.html$/", "/", $file); $meta_data .= "$file
\n"; } echo str_replace('',"\n$meta_data\n", $data); ?>