Re: strange php output

From: Date: Wed, 10 Jul 2002 08:44:42 +0000
Subject: Re: strange php output
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-106717@lists.php.net to get a copy of this message
Calvin, this: (!$page=="datetime") (as I interpret it, that means if $page is false, and it's equal to datetime (which should, in this context, also be false)).... looks like it should read: ($page!="datetime") James "Calvin Spealman" <calvin@ironfroggy.com> wrote in message news:3D2BEFC9.2000308@ironfroggy.com... > I'm trying to do a little trick with my new site. i have one main php > script, index.php which includes the header and footer scripts and the > page script between them. the page script is determined by $page, which > is set to "main" if it doesnt exist already. $page . ".php" is then > included. I have one other page so far, "datetime.php". I wanted to > let datatime run itself by including the headers and footers on its own > if it wasnt included by index.php. so, i add this to the top and > similar code at the bottom (replaced header with footer): > > <? > if (!$page=="datetime") // Not using index.php > { > include("header.php"); > } > ?> > > this code works when datetime.php is included by index.php, but on its > own the script just outputs <html><body></body></html>. Even ignoring > the xhtml code outside the php code in the file. its like the entire > file is ignored. i really have no clue why. anyone else have one? >

« previous php.general (#106717) next »