Using PHP Include

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • benny92000
    Member
    • Feb 2009
    • 46

    Using PHP Include

    I am making a custom PHP page, and i want to include the header and footer of my site in it. How do i do this using PHP.?
  • Jake Bunce
    Senior Member
    • Dec 2000
    • 46598
    • 3.6.x

    #2
    vBulletin doesn't have style files that you can include. But you could modify vBulletin's style to utilize include files which you can then include on your other custom pages. For example:

    Comment

    • benny92000
      Member
      • Feb 2009
      • 46

      #3
      So let me get this right. There is no way to just include my header file and say footer file? I have to manually copy and paste from my header and footer if i want to use coe from them in a custom template? Thanks, and one big favor. Can you please explain this code to me:

      ob_start();
      require("yourheader.html");
      $header_contents = ob_get_contents();
      ob_end_clean();

      I understand most of it, but not thoroughly.

      Comment

      • Jake Bunce
        Senior Member
        • Dec 2000
        • 46598
        • 3.6.x

        #4
        That's just an example. If you need help with specific code for your application then I recommend you post on www.vbulletin.org.

        Comment

        • benny92000
          Member
          • Feb 2009
          • 46

          #5
          Well, all i want to do is include my header and footer templates in a custom template. So i guess that's a yes to the questions i asked in post number 3?

          Comment

          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
          Working...