And I thought I was good! Silly me - Help plz!!!

Discussion in 'PHP' started by uniqueasitis, Jul 26, 2007.

  1. #1
    I am trying to read a css template I downloaded using php. When i use the include command everything works fine but when I break up the css template into three portions head, body, and navigation, and store them in files named head.php, body.php, and navigation.php and then use three include statements to get the template I get this weird character script in my text. Anyone know why weird looking characters are incorporated into the template???????????
     
    uniqueasitis, Jul 26, 2007 IP
  2. killerj

    killerj Active Member

    Messages:
    765
    Likes Received:
    34
    Best Answers:
    0
    Trophy Points:
    95
    #2
    CSS elements have to be included within the head tag only !
    From what i understand from your post , you seem to have placed CSS elements in body.php and navigation.php as well .
    Or am i wrong ?
    kindly provide more details :)
     
    killerj, Jul 26, 2007 IP
  3. uniqueasitis

    uniqueasitis Peon

    Messages:
    661
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    0
    #3
    This is what I did

    I took the basic html template and broke it up into three parts.
    I placed one part in head.php
    The second part in body.php
    and the last part in nav.php

    Then I created a file get.php and put three include statements in it to retrieve the information form the three php files.

    If i only break up the html file into two files, it works well. But if I break it up into three files I begin to see inverted question marks on the left side of the screen.

    If you need more information plz let me know.
     
    uniqueasitis, Jul 26, 2007 IP
  4. killerj

    killerj Active Member

    Messages:
    765
    Likes Received:
    34
    Best Answers:
    0
    Trophy Points:
    95
    #4
    I want to know what exactly you did there , because CSS can only be placed within the <head></head> tags of your html !
     
    killerj, Jul 26, 2007 IP
  5. sebastianrs

    sebastianrs Active Member

    Messages:
    635
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    70
    #5
    He probably just wants to split an XHTML template, which is "CSS-only" based, i.e. no HTML tables... The problem you seem to be facing has something to do with the encoding type of the files. Please show me the files you created (header, body, navigation), and tell me when exactly the problem occurs and when not.
     
    sebastianrs, Jul 26, 2007 IP
  6. Brewster

    Brewster Active Member

    Messages:
    489
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    60
    #6
    Are you able to post some code so that we can either see what is going on, or be able to reproduce the error and debug it ?

    Brew
     
    Brewster, Jul 26, 2007 IP
  7. uniqueasitis

    uniqueasitis Peon

    Messages:
    661
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Yes here it is

    This is the code I placed in the head

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

    Design by Free CSS Templates
    http://www.freecsstemplates.org
    Released for free under a Creative Commons Attribution 2.5 License

    Title : StandardIssue
    Version : 1.0
    Released : 20070723
    Description: A two-column, fixed-width and lightweight template ideal for 1024x768 resolutions. Suitable for blogs and small websites.

    -->
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>StandardIssue by Free Css Templates</title>
    <meta name="keywords" content="" />
    <meta name="description" content="" />
    <link href="default.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <!-- start header -->
    <div id="header">
    <div id="logo">
    <h1><a href="#">StandardIssue<sup>1.0</sup></a></h1>
    <h2>By NodeThirtyThree + FreeCSSTemplates</h2>
    </div>
    <div id="menu">
    <ul>
    <li class="active"><a href="#"> home</a></li>
    <li><a href="#">photos</a></li>
    <li><a href="#">about</a></li>
    <li><a href="#">links</a></li>
    <li><a href="#">contact </a></li>
    </ul>
    </div>
    </div>
    <!-- end header -->

    This is the code I placed in the body

    <!-- start page -->
    <div id="page">
    <!-- start content -->
    <div id="content">
    <!--<div class="box1">
    <p><img src="images/img04.jpg" alt="" width="74" height="79" class="left" /><strong>New Article</strong> sed sollicitudin et, arcu. Vivamus viverra. Nullam turpis. Vestibulum eros. Cras lobortis <a href="#">eget nonummy</a>. Vestibulum vel purus. In eget odio in sapien adipiscing sed blandit. Quisque augue tortor, facilisis sit amet, aliquam.</p>
    </div>-->
    <div class="post">
    <h1 class="title"><a href="">Welcome to StandardIssue 1.0</a></h1>
    <div class="entry">
    <p>This is StandardIssue 1.0, a free, fully standards-compliant CSS template designed by <a href="http://www.nodethirtythree.com/">NodeThirtyThree</a> for <a href="http://www.freecsstemplates.org/">Free CSS Templates</a>. This free template is released under a <a href="http://creativecommons.org/licenses/by/2.5/">Creative Commons Attributions 2.5</a> license, so you’re pretty much free to do whatever you want with it (even use it commercially) provided you keep the links in the footer intact. Aside from that, have fun with it :)</p>
    <p>Be sure to check out some of my commercial work over at <a href="http://www.4templates.com/?aff=nodethirtythree">4Templates</a>. This template is also available as a <a href="http://www.freewpthemes.net/preview/standardissue/">WordPress theme</a> at <a href="http://www.freewpthemes.net/">Free WordPress Themes</a>.</p>
    </div>
    <div class="meta">
    <p class="byline">Posted on July 21, 2007 by NodeThirtyThree</p>
    <p class="links"><a href="#" class="more">Read full article</a> <b>|</b> <a href="#" class="comments">Comments (32)</a></p>
    </div>
    </div>
    <!--<div class="post">
    <h2 class="title"><a href="">Lorem Ipsum Dolor Volutpat</a></h2>
    <div class="entry">
    <p>Curabitur tellus. Phasellus tellus turpis, iaculis in, faucibus lobortis, posuere in, lorem. Donec a ante. Donec neque purus, adipiscing id, eleifend a, cursus vel, odio. Vivamus varius justo sit amet leo. Morbi sed libero. Vestibulum blandit augue at mi. Praesent fermentum lectus eget diam. Nam cursus, orci sit amet porttitor iaculis, ipsum massa aliquet nulla, non elementum mi elit a mauris. In hac habitasse platea.</p>
    </div>
    <div class="meta">
    <p class="byline">Posted on July 18, 2007 by NodeThirtyThree</p>
    <p class="links"><a href="#" class="more">Read full article</a> <b>|</b> <a href="#" class="comments">Comments (32)</a></p>
    </div>
    </div>-->
    </div>
    <!-- end content -->

    and this is the code i placed in the navigation.php

    <!-- start sidebar -->
    <div id="sidebar">
    <ul>
    <!--<li id="search">
    <h2><b>Search</b></h2>
    <form method="get" action="">
    <fieldset>
    <input type="text" id="s" name="s" value="" />
    <input type="submit" id="x" value="Search" />
    </fieldset>
    </form>
    </li>-->
    <li>
    <h2>Pages</h2>
    <ul>
    <li><a href="#">Fusce dui neque fringilla</a></li>
    <li><a href="#">Eget tempor eget nonummy</a></li>
    <li><a href="#">Magna lacus bibendum mauris</a></li>
    <li><a href="#">Nec metus sed donec</a></li>
    <li><a href="#">Magna lacus bibendum mauris</a></li>
    <li><a href="#">Velit semper nisi molestie</a></li>
    <li><a href="#">Eget tempor eget nonummy</a></li>
    </ul>
    </li>
    <li>
    <h2>Categories</h2>
    <ul>
    <li><a href="#">Nec metus sed donec</a></li>
    <li><a href="#">Magna lacus bibendum mauris</a></li>
    <li><a href="#">Velit semper nisi molestie</a></li>
    <li><a href="#">Eget tempor eget nonummy</a></li>
    <li><a href="#">Nec metus sed donec</a></li>
    <li><a href="#">Magna lacus bibendum mauris</a></li>
    <li><a href="#">Velit semper nisi molestie</a></li>
    </ul>
    </li>
    </ul>
    </div>
    <!-- end sidebar -->
    <div style="clear: both;">&nbsp;</div>
    </div>
    <!-- end page -->
    <!-- start footer -->
    <div id="footer">
    <div class="wrap">
    <div id="fbox1" class="box2">
    <h2><b>Lorem</b> Ipsum</h2>
    <p>Curabitur tellus. Phasellus tellus <a href="#">turpis iaculis</a> in, faucibus lobortis, posuere in, lorem. Donec a ante. Donec neque purus, adipiscing id <a href="#">eleifend a cursus</a> vel odio. Vivamus varius justo amet porttitor iaculis, ipsum massa aliquet nulla, non elementum mi elit a mauris. In hac habitasse platea.</p>
    </div>
    <div id="fbox2" class="box2">
    <h2><b>Metus</b> Nonummy</h2>
    <ul>
    <li><a href="#">Magna lacus bibendum mauris</a></li>
    <li><a href="#">Nec metus sed donec</a></li>
    <li><a href="#">Velit semper nisi molestie</a></li>
    <li><a href="#">Consequat sed cursus</a></li>
    <li><a href="#">Eget tempor eget nonummy</a></li>
    </ul>
    </div>
    <div id="fbox3" class="box2">
    <h2><b>Metus</b> Nonummy</h2>
    <ul>
    <li><a href="#">Magna lacus bibendum mauris</a></li>
    <li><a href="#">Nec metus sed donec</a></li>
    <li><a href="#">Velit semper nisi molestie</a></li>
    <li><a href="#">Consequat sed cursus</a></li>
    <li><a href="#">Eget tempor eget nonummy</a></li>
    </ul>
    </div>
    </div>
    <p id="legal">(c) 2007 YourSite. Design by <a href="http://www.nodethirtythree.com/">NodeThirtyThree</a> and <a href="http://www.freecsstemplates.org/">Free CSS Templates</a>.</p>
    </div>
    <!-- end footer -->
    </body>
    </html>
     
    uniqueasitis, Jul 26, 2007 IP
  8. uniqueasitis

    uniqueasitis Peon

    Messages:
    661
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Ok I don't know what was wrong but when I use the following code to include the files it works

    <?include "head.php";?>
    <?include "body.php";?>
    <?include "nav.php";?>

    It works fine but when I use

    <?
    include "head.php";
    include "body.php";
    include "nav.php";
    ?>

    It gives me those weird looking symbols. Guess I will stick with the first code but if any one figures out why the last code does not work plz let me know. Thanks
     
    uniqueasitis, Jul 26, 2007 IP