logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > PHP
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 04-06-2011, 09:37 PM   #1
trickygaming
 
Join Date: Apr 2011
Posts: 10
Default Am i doing it wrong?

ok, so, i have been told to use PHP includes for a previous problem. SO i have followed the tutorial on the homepage of this site.

But, on the frontpage, the guy is only putting in like, for different lines. I am putting in quite alot (around 180)

Im not sure if im putting in lines i shouldn't or if im missing some out.
im am trying to fit the whole menu system from This site into menu.php so i can just update the php file to update everything that is in the latest headlines and so on links.

But when i try to test what i have in the menu.php file alone, i get nothing, sorry if im being to vague. Been trying this for ages now :/
trickygaming is offline   Reply With Quote
Old 04-06-2011, 09:42 PM   #2
DWcourse
DWcourse's Avatar
 
Join Date: Apr 2009
Posts: 3,276
Default

Can you post a sample page and give us a link?

And, are you using .php for your file extension?
__________________
If my answer helped, check out DWcourse.com for Dreamweaver tips and tutorials.
DWcourse is offline   Reply With Quote
Old 04-06-2011, 09:50 PM   #3
trickygaming
 
Join Date: Apr 2011
Posts: 10
Default

ok, here is the sample page > http://www.trickygaming.com/test.html

And i am using a .php extension yes.
trickygaming is offline   Reply With Quote
Old 04-06-2011, 09:58 PM   #4
DWcourse
DWcourse's Avatar
 
Join Date: Apr 2009
Posts: 3,276
Default

The php extension is required on the page that contains the call to the include file (not necessarily on the included file itself). Try changing the file name to test.php.
__________________
If my answer helped, check out DWcourse.com for Dreamweaver tips and tutorials.
DWcourse is offline   Reply With Quote
Old 04-06-2011, 10:00 PM   #5
DWcourse
DWcourse's Avatar
 
Join Date: Apr 2009
Posts: 3,276
Default

Also the include file should include only the html that you want to add to the original page this stuff:

Code:
<html> 
<head><title>Error 404 - Site not published</title> 
<meta name="robots" content="noarchive" /> 
</head> 
<body style="background: #BFDFFF none repeat scroll 0%;">
And the related closing page shouldn't be in there.
__________________
If my answer helped, check out DWcourse.com for Dreamweaver tips and tutorials.
DWcourse is offline   Reply With Quote
Old 04-06-2011, 10:07 PM   #6
trickygaming
 
Join Date: Apr 2011
Posts: 10
Default

ok, so i have took out the part you told me too, and the stuff at the end.
It now starts and ends with DIV tags in there.

It just seems like its not going into the .php file and getting the code.

i have reupped the sample site, with how it is now - http://www.trickygaming.com/test.html
trickygaming is offline   Reply With Quote
Old 04-06-2011, 10:10 PM   #7
DWcourse
DWcourse's Avatar
 
Join Date: Apr 2009
Posts: 3,276
Default

Quote:
Originally Posted by DWcourse View Post
The php extension is required on the page that contains the call to the include file (not necessarily on the included file itself). Try changing the file name to test.php.
CHANGE THE FILE NAME
__________________
If my answer helped, check out DWcourse.com for Dreamweaver tips and tutorials.
DWcourse is offline   Reply With Quote
Old 04-06-2011, 10:16 PM   #8
trickygaming
 
Join Date: Apr 2011
Posts: 10
Default

i thought you meant change the filename of the .php?
I have a test.HTML
and a test.PHP
trickygaming is offline   Reply With Quote
Old 04-06-2011, 10:20 PM   #9
DWcourse
DWcourse's Avatar
 
Join Date: Apr 2009
Posts: 3,276
Default

you need to have a www.trickygaming.com/test.php as your main page and inside that file:

Code:
<?php include("someotherfile.php"); ?>
__________________
If my answer helped, check out DWcourse.com for Dreamweaver tips and tutorials.
DWcourse is offline   Reply With Quote
Old 04-06-2011, 10:24 PM   #10
trickygaming
 
Join Date: Apr 2011
Posts: 10
Default

oh, so to use a .php, the page its in needs to be .php?
trickygaming is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:47 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com