Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Oct 2012
    Location
    mother land --india
    Posts
    159
    Thanks
    37
    Thanked 2 Times in 2 Posts

    Calling template at once

    HI All,

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

    Any views around happy to discuss.


    Regards,
    Nani
    Last edited by nani_nisha06; 10-24-2012 at 04:58 AM.

  • #2
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,091
    Thanks
    51
    Thanked 506 Times in 493 Posts
    If your template has php in it yes you can but I personally think that using file_get_contents() on a template with no php inside is better. Then you can replace tags such as <__username__> <__date__> <__time__> etc using str_replace().

    Thats how I do it anyway.
    My helpful sig is on vacation trying to loose some weight. It got a bit fat and caused a few problems but it will be back at some point!

  • #3
    Regular Coder
    Join Date
    Oct 2012
    Location
    mother land --india
    Posts
    159
    Thanks
    37
    Thanked 2 Times in 2 Posts
    Quote Originally Posted by tangoforce View Post
    If your template has php in it yes you can but I personally think that using file_get_contents() on a template with no php inside is better. Then you can replace tags such as <__username__> <__date__> <__time__> etc using str_replace().

    Thats how I do it anyway.
    Tango,

    Can i pls ask to post some eg or sample pertain to above case, where I am interested to learn on this.

    Regards,
    Nani
    Last edited by nani_nisha06; 10-24-2012 at 01:38 PM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •