note 56648 added to function.include

From: Date: Sun, 11 Sep 2005 02:21:22 +0000
Subject: note 56648 added to function.include
Groups: php.notes 
Request: Send a blank email to php-notes+get-95001@lists.php.net to get a copy of this message
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... ---- Manual Page -- http://www.php.net/manual/en/function.include.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+56648 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+56648&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+56648&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+56648&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+56648&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+56648&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+56648&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+56648&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#95001) next »