Re: More PHP Includes

From: Date: Tue, 10 Mar 2009 23:24:11 +0000
Subject: Re: More PHP Includes
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-289804@lists.php.net to get a copy of this message
On Tue, 10 Mar 2009 09:59:53 -0400, gwpaul@ptd.net ("Gary") wrote: >Thanks again for all the help. > >I created a simple page of all includes (header, menu, 3 columns). I mixed >the file types up. The menu (projectseven PMM) I saved as a library item, >works fine. Had an HTML file in there, but I am guessing that having 2 page >declarations along with an extra set of <head> and <body> tags was playing >havoc with the code, so I removed them. Same thing when I created a php page >and saved it as filename.inc.php, so I removed all the declarations and >tags, again seems to work fine. Also included a simple .txt file. > >I did get some strange results in that all of the <tags> were highlighted >after the menu, and I had to remove and insert again to correct. > >So is this the best way, to create a php page, remove all of the html tags >and page declarations and name it filename.inc.php? (I'm using DW CS3) The main file should set up the page (<head>, <body>, etc). The include file can have any mixture of HTML and PHP, including defining tables, etc. If it contains any PHP it should be named as xxxxx.php. It is also good practice to put <?php at the start, and ?> at the end, though it doesn't appear to make any difference. >Also, something I do not understand, I included a small txt file in a page >of a customer and it shows fine, however this file is not on the server...is >this normal? Sorry; I don't understand this.

« previous php.general (#289804) next »