Topic: rewrite of news gen

well im tryin to get it to write a archive page, that holds links to all the archive pages. just above the part where it generates the monthly archive i put this

    // Open the archive.txt file and add the header
    $atx = @fopen($output_dir_latest.'archive.txt', 'wb');
    if (!$atx)
        error('Unable to write list to '.$output_dir_latest.'archive.txt. Please make sure PHP has write access to the directory '.$output_dir_latest, __FILE__, __LINE__);
    fwrite($atx, "<h2>Archive</h2>\n<ul>");

than right after the close of the monthly file i add

fwrite($atx, "\t<li><a href='index.php?page=archive/".$year_end."-".($month_end > 9 ? $month_end : '0'.$month_end)."'>".$year_end."-".($month_end > 9 ? $month_end : '0'.$month_end)."</a></li>\n");

i also put this right after the while

    //end off the archive file and close it
    fwrite($atx, "</ul>");
    fclose($atx);

but when i run the file it doesnt write the link, it just out puts is

<h2>Archive</h2>
<ul></ul>

can anyone help me out and tell me why its not working? i thought it worked before but its not now.

Re: rewrite of news gen

ok never mind i figured it out.

3

Re: rewrite of news gen

Why not post what the solution was, so others can learn from it?

Re: rewrite of news gen

cuz it was something i change in the code and forgot the change back, it was my fault.  there is a bug in there that is kinda bugging me so i tryed to fix it and ended not working