Ok so I have a godaddy account and I am using PHP.But I have to put the header.php and the footer.php in every folder.I would like it only to be in the main folder.How do I do this?
Next: Form Question?
Previous: Why Must I Purchase A Domain Name For A Website?
"Php Help????????????????????????" was posted on Tuesday, January 26th, 2010 at 9:25 pm.
2 Responses to “Php Help????????????????????????”
Leave a Reply
edit the code
example: index.php
folder
+main.php
in main folder file have index.php and folder in folder have main.php
if you wan take main.php to main folder you most edit code from index.php looking for foldermain.php. delete folder
Just reference the header.php or footer.php file with a full path.
I always create a folder called Include so would put header.php and footer.php in the include folder and then reference them like this.
From the root (main) level:
include(”Include/header.php”)
from one folder down from the root:
include(”../Include/header.php”)
Two levels down?
include(”../../Include.header.php”)
tha’ts all there is to it.