Why does this php symbol come up instead of what's in the php file?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tx9271
    New Member
    • Sep 2010
    • 12

    #1

    Why does this php symbol come up instead of what's in the php file?

    Im trying to make a seperate include php file for my navbar but for some reason it's not working. Instead their is this weird yellow php symbol. It looks like a little yellow shield with white letters that say php. I don't know whats wrong.


    Code:
     <table width="100%" border="0" cellpadding="0" cellspacing="0" id="reportslist">
        <tr>
          <td width="14%" valign="top" bgcolor="#FFFFFF"><p>&bull;Categories &bull;</p>
            <p>&nbsp;
              <?php include("include_sidenav.php");?>
            </p></td>
          <td width="86%" valign="top"><div align="center">
              <table width="700px" border="0" cellspacing="0" cellpadding="5">
                <tr>
                  <td bgcolor="#FFFFFF"><p align="left" style="font-size:12px; font:Arial, Helvetica, sans-serif; font-style:italic; padding:10px;">Welcome to Natural Food Reports!! Here, we offer free reports on a variety of natural food prodcuts. Information has been gather from all across the web from organic food databases to local farmers to the regular person just looking to eat healthier. So feel free to browse our reports down below or if you know exactly what you're looking for, click on <a href="reports.php" class="bluelinks">Reports</a> to see a list of all our reports. Happy Eating!!! </p></td>
                </tr>
              </table>
    HERES WHAT IN THE PHP FILE IM REFERRING TO

    Code:
    <link href="root/index style/index.css" rel="stylesheet" type="text/css">
    <div><p><a href="http://www.naturalfoodreport.com/healthandsuperfoods.php" class="BIGBLUELINKS"> &bull;Health & Superfoods</a></div>
    <div><p><a href="http://www.NaturalFoodReports.com/herbsandspices.php" class="BIGBLUELINKS">&bull;Herbs & Spices</a></p></div>
    <div><p><a href="http://www.NaturalFoodReports.com/supplements.php" class="BIGBLUELINKS">&bull;Supplements</a></p></div>
    <div><p><a href="http://www.NaturalFoodReports.com/cleanses.php" class="BIGBLUELINKS">&bull;Cleanses</a></p></div>
    <div><p><a href="http://www.NaturalFoodReports.com/sustainable.php" class="BIGBLUELINKS" >&bull;Sustainable</a></p></div>
    <div><p><a href="http://www.NaturalFoodReports.com/aromatherapy.php" class="BIGBLUELINKS">&bull;Aromatherapy</a></p></div>
  • code green
    Recognized Expert Top Contributor
    • Mar 2007
    • 1726

    #2
    Do the files with a .php suffix have opening and closing php tags?
    Is the first saved as a php file?
    Why are you calling the second a php file when there is only HTML?

    Never met the yelow shield but sounds like file is not being parsed

    Comment

    • tx9271
      New Member
      • Sep 2010
      • 12

      #3
      it's saved as a .php file but I don't have any php tags in the php file. where should i put them?

      Comment

      • code green
        Recognized Expert Top Contributor
        • Mar 2007
        • 1726

        #4
        opening the file - <?php
        closing the file - ?>

        Comment

        • tx9271
          New Member
          • Sep 2010
          • 12

          #5
          like this?

          Code:
          <?php
          <link href="root/index style/index.css" rel="stylesheet" type="text/css">
          <div><p><a href="http://www.naturalfoodreport.com/healthandsuperfoods.php" class="BIGBLUELINKS"> &bull;Health & Superfoods</a></div>
          <div><p><a href="http://www.NaturalFoodReports.com/herbsandspices.php" class="BIGBLUELINKS">&bull;Herbs & Spices</a></p></div>
          <div><p><a href="http://www.NaturalFoodReports.com/supplements.php" class="BIGBLUELINKS">&bull;Supplements</a></p></div>
          <div><p><a href="http://www.NaturalFoodReports.com/cleanses.php" class="BIGBLUELINKS">&bull;Cleanses</a></p></div>
          <div><p><a href="http://www.NaturalFoodReports.com/sustainable.php" class="BIGBLUELINKS" >&bull;Sustainable</a></p></div>
          <div><p><a href="http://www.NaturalFoodReports.com/aromatherapy.php" class="BIGBLUELINKS">&bull;Aromatherapy</a></p></div>
          ?>

          Comment

          • kovik
            Recognized Expert Top Contributor
            • Jun 2007
            • 1044

            #6
            No, that's not the issue.

            I'm pretty sure the issue here is that the OP is looking at this in Dreamweaver. Dreamweaver's preview is NOT a valid look at the final outcome of your pages. View your pages in a real browser, instead.

            As a side note, I'd recommend weening yourself off of Dreamweaver. Using it encourages inefficient code.

            Comment

            • tx9271
              New Member
              • Sep 2010
              • 12

              #7
              what should I use instead?

              Comment

              • kovik
                Recognized Expert Top Contributor
                • Jun 2007
                • 1044

                #8
                I'm an advocate of clean, simple, efficient applications that serve a specific purpose. Dreamweaver is a product that tries to be too many products at once.

                I recommend:
                1. Notepad++ for writing code,
                2. FileZilla for FTP communication with the server, and
                3. Your browser for viewing the results.
                4. Also, it's a good idea to have an installation of Apache, MySQL, and PHP on your PC in order to test code before uploading it. You can get a user-friendly package of these from http://www.wampserver.com/en/ for Windows PCs.

                Comment

                Working...