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

    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
    8,228

    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 - My currently active Xara software: occasionally serviced XDPX, purposely unserviced XDPX12 & XDPX11 (32/64-bit), unserviced XWD Premium 15 & 12, XPGD10, X3D7 and lots of 'permanently-owned' licences back through time (to CC's Artworks)

  3. #3
    Join Date
    Jun 2010
    Posts
    10

    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
    8,228

    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 - My currently active Xara software: occasionally serviced XDPX, purposely unserviced XDPX12 & XDPX11 (32/64-bit), unserviced XWD Premium 15 & 12, XPGD10, X3D7 and lots of 'permanently-owned' licences back through time (to CC's Artworks)

 

 

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
  •