 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
nicolethompson11
Joined: 05 Jun 2007 Posts: 4
|
Posted: Thu Feb 14, 2008 2:12 am Trouble executing INCLUDE tag (PHP) |
|
|
|
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
|
|
mypointofview

Joined: 18 Mar 2005 Posts: 32 Location: Los Angeles
|
Posted: Thu Apr 10, 2008 6:55 pm |
|
|
|
| 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
|
Posted: Tue May 13, 2008 11:07 am |
|
|
|
| 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 |
|
|
|
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
|
|
|
|
|
 |
|
|
|
|
|
|
|