dqj5046 2015-06-30 12:53
浏览 48

html中的div不会被浏览器执行

I'm making a website and on the profile page, I have a problem with some code there. There is also php used in the page but I don't think that's the problem here. When I load my page on the browser and it is uploaded to my webserver, it does not show the div with the id 'personalinfo', when I look at it with "element inspect", that div does not exist for the browser. I can't find anything wrong in my code.

<!DOCTYPE html>
<?php session_start(); ?>
<html>
<head>
    <title>Minegeekz.com</title>
    <link type="text/css" rel="stylesheet" href="profileStyleSheet.css">
    <style>
       title{
           background: url('<?php $_SESSION['avatar'] ?>') no-repeat;
       }
    </style>
</head>
<body>
   <div id="title">
        <div><h1><?php include 'profileheader.php' ?> </h1></div>
   </div>
   <div id="mid">
        <div class="leftsite">
            <div id="menu">
               <div style="border-top: 0px;">
                    Welcome, <?php include 'welcome.php' ?>
               </div>
               <div>
                   <a href="index.html">Home</a>
               </div>
               <div>
                <?php include 'loginout.php' ?>
            </div>
            <?php include 'registerlink.php' ?>
            <div>
                <a href="About.html">About</a>
            </div>
            <div>
                <a href="contact.html">Contact</a>
            </div>
            <?php include 'forumlink.php' ?>
            <?php include 'profilelink.php' ?>
        </div>
    </div>
    <div id="middle">
        <div id="profilehead">
            <div id="picture">
                <?php include 'avatar.php' ?>
            </div>
            ***<div id="personalinfo">
                <?php echo $_SESSION['fname']; ?><br>
                <?php echo $_SESSION['lname']; ?>
            </div>***
        </div>
    </div>
    <div class="rightsite">
    </div >
</div>
<div id="footer">
    <p>Copyrighted 2015</p>
</div>
</body>
</html>
  • 写回答

2条回答 默认 最新

  • dongyinpan9284 2015-06-30 13:05
    关注

    i think you have declared the url in wrong way check the below code

    .title{background: url("<?php $_SESSION['avatar'] ?>") no-repeat;}

    评论

报告相同问题?

悬赏问题

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