HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
Trouble executing INCLUDE tag (PHP)
Post new topic   Reply to topic    HTML Help Forum Index -> PHP
View previous topic :: View next topic  
Author Message
nicolethompson11



Joined: 05 Jun 2007
Posts: 4

PostPosted: Thu Feb 14, 2008 2:12 am     Trouble executing INCLUDE tag (PHP) Reply with quote

I was hoping somebody could tell me why my "INCLUDE" tag is not working, please? This seemed like a relatively simple piece of code! *LOL* No idea what I'm doing wrong.

Here's my code uploaded:
http://mywebsite.bigpond.com/nicolethompson11

And here's what it's supposed to look like:
http://mywebsite.bigpond.com/nicolethompson11/index-layout.html

I have tried naming the included content file as both ".html" and ".php" but neither works. I even tried the ?readfile tag too, to no avail.

I'm sure I'm doing something really simple wrong!

Many thanks,
Nicole
Corey Bryant
Site Admin


Joined: 15 May 2004
Posts: 8269
Location: Castle Rock CO USA

PostPosted: Thu Feb 14, 2008 9:20 am     Reply with quote



It seems you have it in index.html - http://mywebsite.bigpond.com/nicolethompson11/index.html ? Try renaming the index.html to index.php and see if that works.

_________________
Corey
Toll Free Solutions | Mile High Merchant Accounts | Expression Web Blog
mypointofview



Joined: 18 Mar 2005
Posts: 32
Location: Los Angeles

PostPosted: Thu Apr 10, 2008 6:55 pm     Reply with quote

Yes, that was my problem as well when I started with PHP. Nicole, you can name the to be included files whatever you want. I use .txt as suffix to distinguish them from the real .php pages.
rsleventhal



Joined: 19 Mar 2008
Posts: 20

PostPosted: Tue May 13, 2008 11:07 am     Reply with quote

mypointofview wrote:
Yes, that was my problem as well when I started with PHP. Nicole, you can name the to be included files whatever you want. I use .txt as suffix to distinguish them from the real .php pages.


Sorry for the late addition to this thread, but...

IMNSHO, using .txt or .inc files is inherently bad as they can be displayed. I do also want to know when a file is meant to "stand-alone" or is only good when included so...my preferred method for naming included files is to use <filename>.inc.php so I know they're included php files.

YMMV.

HTH,
-Ray
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> PHP All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial