Welcome to TalkGraphics.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2010
    Posts
    12

    Default How to put php codes above HTML (top header) and below footer (after closing html)

    Hi

    I wonder how on my pages, to place the codes like: (before the <!DOCTYPE html> and other php codes after </html>
    <?php
    ob_start();
    ?>

    Footer
    </html>
    <?php include '/home/website/public_html/news/app/views/pjLayouts/pjActionLoad.php'; ?>

    Currently, it is tedious to do that in FTP, especially when there are a few in different pages.

    Cn this be done by having a placeholder? and if so, What are the steps to do that?

    Note: If I place it in a placeholder and choose place codes in header, it won't work.

    Thank you.

  2. #2
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,746

    Default Re: How to put php codes above HTML (top header) and below footer (after closing html

    Xara advise a Placeholder with the Name <html> will place anything at the start of your page.

    I don't know of a similar thing for appending things though there are two approaches I can think of that might work.

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  3. #3
    Join Date
    Jun 2010
    Posts
    12

    Default Re: How to put php codes above HTML (top header) and below footer (after closing html

    Quote Originally Posted by Acorn View Post
    Xara advise a Placeholder with the Name <html> will place anything at the start of your page.

    I don't know of a similar thing for appending things though there are two approaches I can think of that might work.

    Acorn
    Thank you very much indeed for your proximity and always trying to help.

  4. #4
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,746

    Info Re: How to put php codes above HTML (top header) and below footer (after closing html

    You should be able to use this construct in any body Placeholder:
    Code:
    <?php
        set_include_path("/home/website/public_html/news/app/views/pjLayouts/pjActionLoad.php");
    ?>
    If that doesn't work you can modify your .htaccess file:
    Code:
    php_value include_path "/home/website/public_html/news/app/views/pjLayouts/pjActionLoad.php"
    These are only suggestions as I have not tested either.

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

 

 

Tags for this Thread

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
  •