SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast AimyThomas's Avatar
    Join Date
    Sep 2011
    Posts
    46
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Calling template at once

    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

  2. #2
    Keeper of the SFL StarLion's Avatar
    Join Date
    Feb 2006
    Location
    Atlanta, GA, USA
    Posts
    3,748
    Mentioned
    70 Post(s)
    Tagged
    0 Thread(s)
    the 'once' in require_once (and include_once) does not refer to immediacy, but rather non-repeatability.

    If you try to include a file twice after using a _once() function, it simply will not fetch the file again.

    The file in question is immediately called when you issue the function; however if you're trying to manipulate the contents of a template file, you may be wanting to file_get_contents instead of include/require.
    Never grow up. The instant you do, you lose all ability to imagine great things, for fear of reality crashing in.


Bookmarks

Posting Permissions

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