am having a problem of inserting php include in my menu , whenever i devide my page to put includes i get an error of the display either my menu or page are not showing correct.
Please assist ... below is my page that i want to divide into includes.
----------------- my INDEX.php
<!DOCTYPE html>
<html>
<?php include 'includes/head.php' ; ?>
<body class="home">
<!-- HEADER -->
<?php include 'includes/header.php' ; ?>
<!-- ENDS HEADER -->
<!-- Menu -->
<div id="menu">
<!-- ENDS menu-holder -->
<div id="menu-holder">
<!-- wrapper-menu -->
<div class="wrapper">
<!-- Navigation -->
<ul id="nav" class="sf-menu">
<li class="current-menu-item"><a href="index.php">Home<span class="subheader">Welcome</span></a></li>
<li><a href="#">Questions & Answers<span class="subheader">check out our updated answers</span></a>
<ul>
<li><a href="qa.php"><span> QUESTIONS(09-01-2015)</span></a></li>
<!-- this is where u can remove this and add another content of a dropdown menu
<li><a href="features-accordion.html"><span> Accordion</span></a></li> -->
<!--<li><a href="features-toggle.html"><span> Toggle box</span></a></li>
<li><a href="features-tabs.html"><span> Tabs</span></a></li>
<li><a href="features-infobox.html"><span> Text box</span></a></li>
<li><a href="features-monobox.html"><span> Icons</span></a></li> -->
</ul>
</li>
<li><a href="co_policy.php">Communication Policy<span class="subheader">Read our posts</span></a></li>
<li><a href="#">Information Security Policy <span class="subheader">Read our Information Security</span></a></li>
<ul>
<li><a href="#"><span> Phase 1</span></a></li>
<li><a href="#"><span> Phase 2 </span></a></li>
<!-- u can add this drop down menu if there is another item to be added .
<li><a href="gallery-2.html"><span> Two columns </span></a></li> -->
<!-- u can add this drop down menu if there is another item to be added
<li><a href="video-gallery.html"><span> Video gallery </span></a></li> -->
</ul>
<li><a href="#">Organisation Design Process<span class="subheader">About the design Process</span></a>
<ul>
<li><a href="odp.php"><span> Phase 1</span></a></li>
<li><a href="odp2.php"><span> Phase 2 </span></a></li>
<li><a href="final.php"><span> Final Structure</span></a></li>
<!-- u can add this drop down menu if there is another item to be added .
<li><a href="gallery-2.html"><span> Two columns </span></a></li> -->
<!-- u can add this drop down menu if there is another item to be added
<li><a href="video-gallery.html"><span> Video gallery </span></a></li> -->
</ul>
</li>
<li><a href="advert.php">Advertisment<span class="subheader">check out our advert</span></a></li>
<!--<ul>
<li><a href="cco.php"><span> CCO</span></a></li>
<li><a href="cio.php"><span> CIO</span></a></li>
<li><a href="hol.php"><span> Head of Legal Affairs</span></a></li>
<li><a href="hor.php"><span> Head of Regulatory &Public Affairs</span></a></li>
<li><a href="hsc.php"><span>Head of Supply Chain & Admin</span></a></li>
<li><a href="rcm.php"><span> Risk & Compliance Manager</span></a></li>
</ul>
</li> --><!-- Navigation -->
</div>
<!-- wrapper-menu -->
</div>
<!-- ENDS menu-holder -->
</div>
<!-- ENDS Menu -->
<!-- Slider -->
<div id="slider-block"></div>
<!-- ENDS Slider -->
<!-- MAIN -->
<div id="main">
<!-- wrapper-main -->
<div class="wrapper">
<!-- headline -->
<div class="clear"></div>
<!-- ENDS headline -->
<!-- content -->
<div id="content">
<!-- TABS -->
<!-- the tabs -->
<ul class="tabs">
<li></li>
<li></li>
<li></li>
</ul>
<!-- tab "panes" -->
<div class="panes">
<!-- Posts -->
<div>
<ul class="blocks-thumbs thumbs-rollover">
<li>
<a href="#" class="thumb" title="An image"><img src="images/mission.png" alt="Post" /></a>
<div class="excerpt">
<a href="#" class="header">Pionniers</a>
Pour demeurer au sommet, nous cherchons sans relâche des solutions innovantes, et nous augmentons constamment de connaissances de base avec une passion absolue pour l’excellence.
</div>
</li>
<li>
<a href="#" class="thumb" title="An image"><img src="images/vision.png" alt="Post" /></a>
<div class="excerpt">
<a href="#" class="header">Professionels</a>
Dans tout ce que nous faisons, nous nous focalisons sur l’orientation et l’objectif du client. En tout temps, nous effectuons nos tâches avec compétence, diligence et éthique.
</div>
</li>
<li>
<a href="#" class="thumb" title="An image"><img src="images/value.png" alt="Post" /></a>
<div class="excerpt">
<a href="#" class="header">Personnels</a>
A l’interne, nous sommes conscients que nous sommes une société de personnes et ces personnes sont la société. Nous apprécions que chacun est un membre valeureux, intrinsèque de l'organisation, indépendamment de son genre, de sa race ou de sa position. Notre relation avec nos clients nous aidera à les satisfaire avec une chaleur et une réelle
volonté d'anticiper et de répondre à leurs besoins.
</div>
</li>
</ul>
</div>
<!-- ENDS posts -->
<!-- Information -->
<div>
<div class="plain-text">
<h6>Pellentesque habitant morbi tristique senectus et netus et malesuada.</h6>
<p>Fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus. </p>
<p>Fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus.Fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper <a href="single.html">This is a link</a>. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus. </p>
</div>
</div>
<!-- ENDS Information -->
<!-- Posts -->
<div>
<ul class="blocks-thumbs thumbs-rollover">
<li>
<a href="single.html" class="thumb" title="An image"><img src="img/dummies/282x150.gif" alt="Post" /></a>
<div class="excerpt">
<a href="single.html" class="header">Lorem ipsum dolor</a>
Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra.
</div>
</li>
<li>
<a href="single.html" class="thumb" title="An image"><img src="img/dummies/282x150.gif" alt="Post" /></a>
<div class="excerpt">
<a href="single.html" class="header">Lorem ipsum dolor</a>
Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra.
</div>
</li>
<li>
<a href="single.html" class="thumb" title="An image"><img src="img/dummies/282x150.gif" alt="Post" /></a>
<div class="excerpt">
<a href="single.html" class="header">Lorem ipsum dolor</a>
Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra.
</div>
</li>
</ul>
</div>
<!-- ENDS posts -->
</div>
<!-- ENDS TABS -->
</div>
<!-- ENDS content -->
</div>
<!-- ENDS wrapper-main -->
</div>
<!-- ENDS MAIN -->
<!-- Twitter --><!-- ENDS Twitter -->
<!-- FOOTER -->
<?php include 'includes/footer.php' ; ?>
</html>
Maryamma : you're confusing <header/> which is a new HTML5 tag made for the header part of a web page's design, with the <head/> tag with is indeed meant to be outside of the body. ft85's include order is perfectly fine.
ft85 : Ooops, you created your topic in the french mirror of the website. I hope the topic can be moved to its proper place.
As for your problem, what is not correct about what you see ? Your description is way too vague for us to have a clue on what's going on.
first i would like to know how to move this topic to a proper place if possible.
second my problem is when i call for an include using the include php , am getting a menu which is not well designed and also i dont see the php tags appearing so that means the way i have place the include is not well working as it is supposed too especially in the design view.
I would like to know how to move this topic to a proper place if possible.
You can't. A moderator is needed.
ft85 a écrit:
My problem is when i call for an include using the include php , am getting a menu which is not well designed and also i dont see the php tags appearing so that means the way i have place the include is not well working as it is supposed too especially in the design view.
Well, it does work as intended, considering your header.php file has no PHP code means including it is the same as echoing its contents. Now, what you do need to check is either the output HTML code is as intended or not. From your web browser, ask for the page's source code to see the HTML code recieved after PHP finished its work.
{LVM}Plan de "partitions" pour machines virtuelles ? Carte de capture sous linux ? Erreur ACPI au boot ?
{LVM}Plan de "partitions" pour machines virtuelles ? Carte de capture sous linux ? Erreur ACPI au boot ?
You can also use include_once() instead of include() for PHP controler pages included to avoid some problems