Xampp not displaying Includes

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Xampp not displaying Includes

Postby logicsound » 17. March 2010 19:00

I have a website that I have taken over and it works fine on the web (hosted) I am still new to php so I have setup a xampp server on my xp machine so I can work with the website and see changes locally. Everything with the install of xampp works perfect, xampp website works fine. So I created a new folder and copied all my files in the directory (htdocs/test) When I go to localhost/test my page is displayed but none of the includes (which is most of the site) are included. Do I need to do something with php.ini?

Here is some of my code


Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

   <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
   <link rel="shortcut icon" href="http://www.xxxxxx.com/images/favicon.ico" type="image/x-icon">
   <meta name="keywords" content="lockers, school lockers, plastic lockers, athletic lockers, toilet partitions">
   <meta name="description" content="xxxx is a nationwide supplier of all types and brands of lockers, toilet partitions and washroom accessories for any commercial or industrial application">   
<meta name="city" content="xx">
<meta name="state" content="NC">
<meta name="robots" content="all=index,follow">
<meta name="revisit-after" content="15 days">
<meta name="Copyright" content="2009 copyright">
<meta name="MSSmartTagsPreventParsing" content="TRUE">
<meta name="distribution" content="Global">
   <? include('browserCheck.php'); ?>
   <link rel="shortcut icon" href="http://www.xxxxx.com/favicon.ico" type="image/x-icon">


<body onload="initsidebarmenu();">
  <div id="wrapper">
    <div id="header"> </div>
    <div id="left">
      <div id="logo">
      <a href="/"><img src="images/logo.gif" alt="xxxxx" style="position:absolute; left:22px; top:7px;"></a>
        <!--<p>We give you a place to stick it</p>-->
      <div id="nav">
        <? include('menu.php'); ?>

      <div id="news">
        <h2>CCR Cage Registered</h2>       
   <? include('ccr.php'); ?>
   <div class="hr-dots"></div>
   <h2>Woman-Owned Business</h2>
        <? include('nwboc.php'); ?>
   <div class="hr-dots"></div>
   <h2>Lockers by:</h2>
        <? include('lockerMakers.php'); ?>
   <div class="hr-dots"></div>
   <h2>Toilet Partitions by:</h2>
        <? include('tpMakers.php'); ?>
   <div class="hr-dots"></div>
   <h2>Washroom Accessories by:</h2>
        <? include('accMakers.php'); ?>
Posts: 1
Joined: 17. March 2010 18:44

Re: Xampp not displaying Includes

Postby WilliL » 17. March 2010 19:38

you are not using the actuell writing for including php commands:
<? include('ccr.php'); ?> replace by <?php include('ccr.php'); ?> (the other one lines too)

Another possibility is switching short_open_tags ON in php.ini. On my opinion it's not a good idea - it will work now but in later time you will get trouble.
(a lot of hosters have switched short_open_tags ON, to get less trouble with their customers)
Posts: 662
Joined: 08. January 2010 10:54
Operating System: Win7Home Prem 64 SP1

Re: Xampp not displaying Includes

Postby MC10 » 18. March 2010 03:25

Yes, it is recommended that you use <?php ?> rather than <? ?>.
Posts: 148
Joined: 20. February 2010 20:13

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 61 guests