dongyukui8330 2014-05-28 05:32
浏览 104

索引文件与包含文件冲突

I have a problem with my index.php together with my "include files". My index.php file is located inside the main folder named mysite and the rest inside it are subfolders with the respective .php files. The sub-folder files are working perfectly, except the index.php. The include files are messed up every time I preview it in the browser.

The path for the index.php file goes like this:

mysite/index.php

The path for the include files goes like this:

mysite/pages/include/header.php

Here is the HTML file with the include files:

<html>
   <head>

   <?php 
   include ("pages/include/headertop.php");
   include ("pages/include/header.php");
   include ("pages/include/nav.php"); 
   ?>

   </head>
</html>

Kindly correct me if I have missed something here.

By the way, I'm using XAMPP.

Thank you and More power!

  • 写回答

2条回答 默认 最新

  • douhao2856 2014-05-28 05:38
    关注

    edit your index.php:

    include ("../pages/include/headertop.php");
    include ("../pages/include/header.php");
    include ("../pages/include/nav.php");  
    

    and try again "mysite/index.php"

    评论

报告相同问题?

悬赏问题

  • ¥15 划分vlan后不通了
  • ¥15 GDI处理通道视频时总是带有白色锯齿
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制
  • ¥15 merge函数占用内存过大
  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大
  • ¥15 单片机无法进入HAL_TIM_PWM_PulseFinishedCallback回调函数