Php Help????????????????????????
RSS

Php Help????????????????????????

Category: FAQ   Time: 2010-01-26   Tags:

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????????????????????????”
  1. eg8524(2010-01-27):

    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

  2. ozzymani(2010-01-27):

    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.

Leave a Reply

 
Recent Posts
Random Posts