note 56648 deleted from function.include by vincent

From: Date: Sun, 11 Sep 2005 09:02:32 +0000
Subject: note 56648 deleted from function.include by vincent
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-95005@lists.php.net to get a copy of this message
Note Submitter: benrr101 at bright dot net Reason: bad code ---- I noticed that if you use the include function to make site design easier. You can set what is included to be a variable and then in the url add an extra code. Example: <?php include ("$page"); ?> then to define "page" make your url: host.com/index.php?page=another.html I also suppose that you could do something similar by doing this: <?php if ($condition == "true") { include('file1.html')}; else if ($condition2 == "true") { include('file2.html')}; ?> so if the url is host.com/index.php?condition=true it'll return a page with file1.html included. or if the url is host.com/index.php?condition2=true it'll return a page with file2.html included. I think...

« previous php.notes (#95005) next »