Calling template at once

Discussion in 'PHP' started by AimyThomas, Oct 23, 2012.

  1. #1
    Hello Again,

    I am just wanted to know if we can call the Template using "require_once" at PHP?

    Any views around happy to discuss.

    Thanks in Advance
     
    AimyThomas, Oct 23, 2012 IP
  2. scottlpool2003

    scottlpool2003 Well-Known Member

    Messages:
    1,708
    Likes Received:
    49
    Best Answers:
    9
    Trophy Points:
    150
    #2
    You can use require or include.

    
    <?php
    
    include "yourfolder/yourfile.php";
    require "yourfolder/yourfile.php";
    require_once "yourfolder/yourfile.php";
    
    ?>
    
    PHP:
     
    scottlpool2003, Oct 24, 2012 IP
  3. Gifted6

    Gifted6 Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    It really depends on where do you keep your template.
     
    Gifted6, Oct 24, 2012 IP
  4. pixelator

    pixelator Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You can do call a template using that built in function. It will be depend on you objective. Some website have multiple templates ie. hom page, sub page and article.
     
    pixelator, Oct 24, 2012 IP