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.
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
Re: How to put php codes above HTML (top header) and below footer (after closing html
Quote:
Originally Posted by
Acorn
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.
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