Is there anything special to allow server side includes in PHP to work? We upgraded PHP and now the headers and footer includes are no longer working ... Any changes required on the server side? Any help will be appreciated.
2 Answers
Hi,
Try using this: include($_SERVER['DOCUMENT_ROOT'] . '/directory/myfile.php');
$_SERVER['DOCUMENT_ROOT'] will give you /home/USERNAME/public_html. If you're using an add-on domain, that directory will be included at the end.
So your include will look like /home/USERNAME/public_html/directory/myfile.php
Phil
I think you need to paste some special code into .htaccess file for that option to start to work.