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
    165
    Thanks
    38
    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,312
    Thanks
    58
    Thanked 525 Times in 512 Posts
    Blog Entries
    5
    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.
    See my new CodingForums Blog: http://www.codingforums.com/blogs/tangoforce/

    Many useful explanations and tips including: Cannot modify headers - already sent, The IE if (isset($_POST['submit'])) bug explained, unexpected T_CONSTANT_ENCAPSED_STRING, debugging tips and much more!

  • #3
    Regular Coder
    Join Date
    Oct 2012
    Location
    mother land --india
    Posts
    165
    Thanks
    38
    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
    •