Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7419709
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T08:07:02+00:00 2026-05-29T08:07:02+00:00

I am having problems with my php includes and I am wondering if someone

  • 0

I am having problems with my php includes and I am wondering if someone can tell what could be wrong with my code. This is how my file set is broken down.

I have two index files. one in bank\index.php and one in bank\onlinebanking\index.php.

I have split my header and footer in two different files. They are listed as
bank\header.inc.php and bank\footer.inc.php. I capture my css from my header for the entire website.

header includes:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Banking Home Page</title>
</head>

<body class="body">
<link href="../_assets/stylesheets/style.css" rel="stylesheet" type="text/css" />
<div>

<table border="0" width="100%" cellspacing="0" cellpadding="0" background="_assets/images/bkrnd_top.png">
  <tr>
    <td width="50%"><img border="0" src="../_assets/images/bkgrnd_tl.png" width="205" height="61"></td>
    <td width="50%">
      <p align="right"><img border="0" src="../_assets/images/logo.png" width="160" height="61"></td>
  </tr>
</table>
</div>
<div>

<table border="0" width="100%" cellspacing="1" cellpadding="0" background="_assets/images/background_headerarea.png">
  <tr>
    <td width="100%"><font face="Arial" size="2"><b>&nbsp;&nbsp; <font color="#FFFFFF">HOME&nbsp;&nbsp; |&nbsp;&nbsp; TBA&nbsp;&nbsp; |&nbsp;&nbsp; TBA&nbsp;&nbsp; |&nbsp;&nbsp; TBA&nbsp;&nbsp; |&nbsp;&nbsp; TBA&nbsp;&nbsp; |&nbsp;&nbsp; TBA</font></b></font></td>

<td>

</tr>


</table>
<?php require_once('login.inc.php'); ?>

The problem I am having I cannot get my css or my _assets to render correctly for both of my inex files.

If I change the link to something like src=”../_assets/images/bkgrnd_tl.png” it will display correctly in bank\onlinebanking\index.php but it will not display in bank\index.php. If I change the link to src=”_assets/images/bkgrnd_tl.png” it will display in bank\index.php and not in bank\onlinebanking\index.php.

I hope you get the idea what I trying to say. I would like just one header and footer for all the css to render on all pages.

My includes are as such:

bank\onlinebanking\index.php =

        require_once('../websiteconfig.inc.php');
        require_once('../header.inc.php');    
    ?>

bank\index.php

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T08:07:03+00:00Added an answer on May 29, 2026 at 8:07 am

    Setting up some path variables might help you. Then you could provide an absolute path on all your images and css. Something like:

    define("PATH", "http://www.mysite.com");
    

    Then you can do something like:

    <img border="0" src="<?php echo PATH; ?>/_assets/images/bkgrnd_tl.png" width="205" height="61">
    

    You can set up multiple paths that lead to different areas too, like a theme path for example.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having problems with this code below. I would like someone tell me why
I'm having problems with changing my configuration file config.php . At the moment, I'm
I've never seen anything like this. File structure: somefolder/base.php includes/stuff.php includes/constants.php base.php: <?php require(../includes/stuff.php);
I'm having problems deleting a file from a higher directory, I found this post
I'm having problems debugging a failing mysql 5.1 insert under PHP 5.3.4. I can't
This is follow up post where I'm having a problem where my php code
I'm having some problems with the following code: <?php $temp = $wp_query; $wp_query= null;
Ok. It seems that I am having some problems with my PHP code, and
I'm having problems putting two where statements together My current code: include 'config.php'; $result22
I'm having problems embedding php inside an html file. I first ran in to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.