Hi guys,
I am a bit confuse... I am using includes in my index.php such as:
<?php
$page = $_GET['page'];
if (!$page) {
$page = "print";
}
include("portfolio/header.php");
include("portfolio/".$page.".php");
include("portfolio/footer.php");
?>
Then, I have a folder call: Portfolio, which contains print.php and PRINT(folder) such as:
index.php >
PORTFOLIO(folder) >> print.php (link to) > PRINT(folder) cantain: img (folder) & project1.php / project2.php /project3.php /project4.php /project5.php....
INTRO PROBLEM
I have 9 thumbs (project1.png, project2.png, project3.png...) linking to 9 php pages (project1.php, project2.php, project3.php...)
It's the code :
<?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>';
}
}
?>
PROBLEM
Project1.php, Project2.php, Project3.php, Project4.php Not shows header.php & footer.php includes
<?php include ("portfolio/header.php");
?>
<?php include ("portfolio/print/images.php"); ?>
<!-- Content -->
<!-- Title - Print -->
<p class="title">Print <span id="clients_name">Print 1</span></p>
<h2 id="img">
<img src="portfolio/print/img/main/project2.jpg" alt="project2" width="474" height="295" />
</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 include ("portfolio/footer.php");
?>