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 1009641
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T08:57:35+00:00 2026-05-16T08:57:35+00:00

Problems Project1.php does not show: CSS, thumbs and sidebar navegation I do not know

  • 0

Problems

Project1.php does not show: CSS, thumbs and sidebar navegation

I do not know what is wrong with it?

Site Structure:

giving
   | - - css
   | - - footer.inc.php
   | - - header.inc.php
   | - - index.php
   | - - portfolio
               | - - print
                       | - - images.inc.php
                       | - - img
                              | - - main
                                      | - - project1.jpg
                                      | - - project2.jpg 
                              | - - thumbs
                                      | - - project1.png
                                      | - - project2.png            
                       | - - project1.php
                       | - - project2.php
               | - - print.php

         | - - web
                | - - images.inc.php
                | - - img 
                ....
                | - - web.php

                | - - consulting
                | - - consulting.php

                | - - illustration
                | - - illustration.php

The Index.php looks like:

<?php    
                $page = $_GET['page'];

                if (!$page) {
                 $page = 'page';
                }          

            include("header.inc.php");
            include("portfolio/".$page.".php");
            include("footer.inc.php");
?>

The Thumbs linking to pages:

<ul id="thumbs">

  <?php
  $dir = 'portfolio/print/img/thumbs/';
  $path = 'portfolio/print/';

  $fileTypes = array( '.png', '.jpg', '.gif');

  foreach( $fileTypes as $extension ) {
      foreach( glob($dir . '*' . $extension) as $projectImage ) {
          $projectName = basename($projectImage, $extension);
          $project = $projectName . '.php';
          echo '<li>
              <a href="'. $path . $project . '">
              <img src="' . $projectImage . '" alt="' . $projectName . '" />
              <strong>'. $projectName .'</strong>
              </a>
              </li>';
      }
  }
// Thanks to Maggie for the Help!
?>

Project1.php:

I’m including footer.inc.php / header.inc.php / images.inc.php like so:

<?php
   $path = $_SERVER['DOCUMENT_ROOT'];
   $path .= "/giving/header.inc.php";
   include_once($path);
?>
<?php
   $path = $_SERVER['DOCUMENT_ROOT'];
   $path .= "giving/portfolio/print/images.inc.php";
   include_once($path);
?>
<!-- Content -->
<!-- Title - Print -->  
    <p class="title">Print <span id="clients_name">Print 1</span></p>                               
    <h2 id="img">
      <?php

        $main_dir = 'img/main/';
        $scan = scandir ($main_dir);

        echo '<img src="' . $main_dir . $scan[3] . ' "alt ="images" />';
        ?>
    </h2>
    <p class="brief">
        <span>Brief:</span> He felt a slight itch up on his belly; pushed himself slowly up on his back towards the headboard so that he could lift his head better; found where the itch was, and saw that it was covered with lots of little white spots which he didn't know what to make of. 
        </p>        
    <h4><a title="Go Live" href="#">Live Project</a></h4>

<?php
   $path = $_SERVER['DOCUMENT_ROOT'];
   $path .= "/giving/footer.inc.php";
   include_once($path);
?>

Header.inc.php

<!DOCTYPE html> 
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Giving - 1st theme</title>
        <link href="css/layout.css" type="text/css" media="screen, projection" rel="stylesheet">
    </head>
    <body>
  <div id="portfolio">
    <div class="content">
        <h1><a href="#home" title="Panel's Home Page">Panels Logo Portfolio</a></h1>
        <div id="projects_services">
            <div id="print_section">
                <?php // $currentPage = basename($_SERVER['SCRIPT_NAME']); ?>
                <ul id="sidebar">


                  <?php

                        $sections = array("Print", "Web", "Illustration", "Consulting");

                        foreach ($sections as $row) { 
                            echo "<li><a href=\"index.php?page=$row\"";

                            if ($row == $page) { 

                                echo "class=\"selected\"";
                            }

                            echo ">$row</a></li>\n";                
                        }


                    ?>

              <!-- <li>
                <a href="print.php" <?php // if ($currentPage == 
                //                 'index.php?page=print.php') {echo 'class="selected"';} ?> title=" ">Print</a> 
              </li>           
              <li>
                <a href="index.php?page=web.php" <?php // if ($currentPage == 
                //                 'index.php?page=web.php') {echo 'class="selected"';} ?> title=" ">Web</a> 
              </li>
              <li>
                <a href="index.php?page=illustration.php" <?php // if ($currentPage == 
                //                 'index.php?page=illustration.php') {echo 'class="selected"';} ?> title=" ">Illustration</a> 
              </li>
              <li>
                <a href="index.php?page=consulting.php" <?php // if ($currentPage == 
                //                 'index.php?page=consulting.php') {echo 'class="selected"';} ?> title=" ">Consulting</a> 
              </li> -->
                </ul><!-- End sidebar-->   

Phew!

Thank you!

  • 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-16T08:57:36+00:00Added an answer on May 16, 2026 at 8:57 am

    Your header is linking to a relative URL (css/layout.css). Make it link to an absolute path (/css/layout.css).

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

Sidebar

Ask A Question

Stats

  • Questions 507k
  • Answers 507k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Info for invalidation proxy cache: http://linux-sysadmin.org/2010/08/nginx-invalidation-purging-content/ May 16, 2026 at 4:06 pm
  • Editorial Team
    Editorial Team added an answer waitForPageToLoad will wait until the next page is loaded. So… May 16, 2026 at 4:06 pm
  • Editorial Team
    Editorial Team added an answer Use: SELECT x.id AS pID, x.slug AS url, x.revision, x.title,… May 16, 2026 at 4:06 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

My site uses a php function to tweet an update whenever an event occurs.
I have created a Question of the week project in PHP and I have
I have a little problem with my regular expression, that I use in PHP.
After some problems solved, I got a tricky stuff. I am using an overlay
I have been using eclipse-pdt in conjunction with xdebug and apache without problems, for
As a web developer looking to move from hand-coded PHP sites to framework-based sites,
What are the best options for connecting PHP apps to logic located in .NET
I'm currently internationalizing an existing PHP project and thought the easiest way to do
I'm using Windows on some production machines (IIS with FastCGI-PHP). Since the update of
I've been trying to use grubers latest url matching regex in a php project.

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.