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:

  1. check html source of loaded page. missing closing tag etc can throw off layout
  2. make sure didn't include/require load_footer.php in load_content.php file [it happens double check :)]
  3. could css issue footer.
  4. could php errors put @ top of code (or edit php.ini file):

    ini_set('display_errors', 'on'); error_reporting(e_all); 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -