work around to show my news?

From: Date: Mon, 04 Sep 2000 17:46:06 +0000
Subject: work around to show my news?
Groups: php.general 
Request: Send a blank email to php-general+get-15161@lists.php.net to get a copy of this message
i have my news showing up on a page, but it wouldn't show because my php file had this: if(!isset($page)){ $page = 'main'; } /* Retrieve the contents based on whether or not the file actually exists. */ if(file_exists("/usr/home/clans/users/db/$page.html")){ if((!eregi('\.cgi$', $page.cgi))&&(!eregi('\.pl$', $page.pl))){ $content = join('', file("/usr/home/clans/users/db/$page.html")); } }else{ $content = "<b>PAGE NOT FOUND.</b><br><a href=\"javascript:history.back(1)\">Back to last page</a>"; } so i wrote a workaround in my news include page (news.html) that goes like this: if(!eregi(news.html)){ $title = 'News'; $content = join('', file("/usr/home/clans/users/db/newspro/news.txt")); } but i get an error, while at the same time it shows the page. is there a better way to do the workaround so that i dont get an error? it does sort of slow my page down take it easy, cause i'm a newbie -- Cody Merrill 38494034 Splitskull@home.com

« previous php.general (#15161) next »