So, first off I may be going about this completely wrong since i’m a complete php newb.
What i’m doing:
I have a page, we’ll call it mypage.php
in mypage.php, using various loops I am generating a page realtime by echoing the output of my loops. I am also creating .html pages elsewhere and then linking to them. The problem is fwrite() returns how many bytes its written and it gets on the original page. Example:
[php]
while (some condition){
echo “<a href=“mynewpage.html”>mynewpage” //This should be on the current page
$fp = fopen ($fp,“mynewpage.html”);//This should create the linked page
echo fwrite($fp, “”);
echo fwrite($fp, “”);
echo fwrite($fp, “SOME CONTENT”);
echo fwrite($fp, “”);
echo fwrite($fp, “”);
fclose($fp)
}
[/php]
The problem I’m ending up with is that on the “current page” or “first page” fwrite returns the number of bytes its written, so I end up with the returns from fwrite scattered throughout the links on that inital page.
Any guidance you guys provide would be appreciated.