PHP包括代码显示一件事,但浏览器显示另一件事

时间:2013-10-17 01:33:35

标签: php include

我在一个看起来像这样的网页上有一系列的php ...

<?php include 'folder1/file.php'; ?>
<?php include 'folder2/file.php'; ?>
<?php include 'folder3/file.php'; ?>

它们在我的代码编辑器中看起来像上面那样,但是当我上传到我的服务器时,当我查看源代码时,它会像这样查看...

<?php include 'folder1/file.php'; ?>
<?php include 'folder3/file.php'; ?>
<?php include 'folder3/file.php'; ?>

所以我想也许文件没有上传....所以我把代码更改为此并上传了页面....

<?php include 'folder1/file.php'; ?>
<?php include 'folder3/file.php'; ?>

当在任何浏览器中查看它时,它按预期查看,只显示两个包含。告诉我网页正在上传到服务器。我已经清空了缓存,刷新了页面而没有任何内容。那么当我将代码更改回此并上传....

<?php include 'folder1/file.php'; ?>
<?php include 'folder2/file.php'; ?>
<?php include 'folder3/file.php'; ?>

它仍然在实况页面中显示了这一点

<?php include 'folder1/file.php'; ?>
<?php include 'folder3/file.php'; ?>
<?php include 'folder3/file.php'; ?>

我在服务器上安装了PHP,所有其他PHP代码/包都正常工作。以下PHP代码可以正确运行。

<?php phpinfo(); ?>

这是folder2 / file.php的代码

<div class="propertylistingbox" id="propertylistingbox">
  <div class="proplistingleft" id="proplistingleft"><a href="second-base/index.php"><img src="/second-base/images/FirstBase01.png" alt="Second Base Exterior" width="284" height="193" border="0" /></a>                    
    <div class="reservation-request-button"><a href="../properties-search.php"></a>
    </div>
</div>
  <div class="propertylistingmain" id="propertylistingmain">
    <div class="propheader" id="propheader">
      <h3>SECOND BASE</h3>
    </div>
    <div class="propbulletlist" id="propbulletlist">
      <ul>
        <li>Located In Oneonta, NY</li>
        <li>Accommodates 4</li>
        <li>High Speed Internet</li>
        <li>2 Bedrooms</li>
        <li>Close to 3 bedroom apartment &quot;First Base&quot;</li>
        <li>1.25 Miles to Cooperstown Baseball World</li>
        <li>2.75 Miles to Cooperstown All Star Village</li>
        <li>19 Miles to Cooperstown Dreams Park</li>
      </ul>
    </div>
    <div class="propdetails" id="propdetails">
        <div class="details-button">
        <a href="second-base/index.php">Click For More Details</a>
    </div>
</div>
    <div class="propspecialsbanner" id="propdetails2"></div>
    <div class="propcalendarmaplink" id="propcalendarlink"><strong><a href="second-base/index.php">CALENDAR OF AVAILABILITY</a></strong><br />
  <strong><a href="https://maps.google.com/maps?q=119+Chestnut+Street,+Oneonta,+NY+13820&hl=en&sll=42.454503,-75.069752&sspn=0.017447,0.046391&oq=119+CHESTNUT+STreONEONTA+NY+13820&hnear=119+Chestnut+St,+Oneonta,+Otsego,+New+York+13820&t=m&z=17" target="_new">GOOGLE MAP</a></strong></div>
  </div>
</div>

0 个答案:

没有答案