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
    179
    Thanks
    39
    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 05:58 AM.

  • #2
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,474
    Thanks
    63
    Thanked 537 Times in 524 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.
    I can't really think of anything to write here now...

  • #3
    Regular Coder
    Join Date
    Oct 2012
    Location
    mother land --india
    Posts
    179
    Thanks
    39
    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 02: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
    •