html - PHP: require_once for multiple files but coming out of order -
i'm working on startup requires website. i'm doing writing many separate php files , having index.php page load them each require_once('file.php') function(parameters), , that's been working fine (and has worked me).
i'm getting peculiar error. index page looks this:
<?php require_once('load_heading.php'); require_once('load_header.php'); header(stuffs) require_once('load_content.php'); content(foobar) require_once('load_footer.php'); ?>
everything has been working totally fine other pages, particular page, footer, in load_footer.php, shows in middle of contents load_content.php adds page...
has encountered similar errors, or knows solution? if means anything, load_content.php pulls information database , puts in looks neat.
i can not comment due rep yet. things check first:
- check html source of loaded page. missing closing tag etc can throw off layout
- make sure didn't include/require load_footer.php in load_content.php file [it happens double check :)]
- could css issue footer.
could php errors put @ top of code (or edit php.ini file):
ini_set('display_errors', 'on'); error_reporting(e_all);
Comments
Post a Comment