Php 无法设置背景图像

Php 无法设置背景图像,php,html,css,Php,Html,Css,我试图将这个文件中的背景图像设置为indx.php 我试过了,但没用背景还是空白。但如果我成功地将扩展名更改为index.html后台集。我不明白代码中有什么错误,以及为什么会这样 <html> <head> <style> body { background-image: url("back.jpg"); background-position:0px 0px; backgroun

我试图将这个文件中的背景图像设置为indx.php 我试过了,但没用背景还是空白。但如果我成功地将扩展名更改为index.html后台集。我不明白代码中有什么错误,以及为什么会这样

<html>
    <head>
    <style>
     body
      {
        background-image: url("back.jpg");
        background-position:0px 0px;
    background-size: cover;
        background-repeat: repeat;
      }
    </style>
    </head>
    <body>
    <style>
    table{
        border-spacing:15px;
    }
    td{
        padding:30px;
    }
     body
      {
        background-image: url(back.jpg);
    background-size: cover;
        background-repeat: repeat;
      }
    </style>
    </body>
    <?php

    require "connect.php";

      $sql="select * from nbook";
    $row = $conn->query($sql);
    $n=0;
    echo"<form method='post'><table border='0' align='center'><tr>";
        while($arr = $row->fetch_assoc()) 
        {
               $i=$arr['BookId'];
        if($n%3==0)
        {
        echo "<tr>";
        }
       echo "
        <td height='280' width='240' align='center'><img src='data:image/jpg;base64,".base64_encode( $arr['BookImage'] )."'height='250' width='200'><br/>
        <b>BOOKNAME:</b>".$arr['BOOKNAME']."
       <br><b>Author:</b>".$arr['Author']."
       <br><b>Publication:</b>&nbsp;".$arr['PublicatonHouse']."
       <br><b>Discount:</b>".$arr['Discount']."%
       <br><br><img src='images/MetalPlakDa5new.gif' width='70' height='20'/></a>
       <img src='images/view7.jpg' width='70' height='20'/></a>
       </td>";
      $n++;
        }




          echo "</tr></table>
           </form>";
        ?>

    </body>
    </html>

身体
{
背景图片:url(“back.jpg”);
背景位置:0px 0px;
背景尺寸:封面;
背景重复:重复;
}
桌子{
边界间距:15px;
}
运输署{
填充:30px;
}
身体
{
背景图片:url(back.jpg);
背景尺寸:封面;
背景重复:重复;
}
我有自己的答案
事实上,图像就在那个里,但它正在滑动和消失,所以

background-position:0px 0px;
background-attachment:fixed;

这两件事应该添加

也许这部分有问题:
需要“connect.php”
该文件存在吗?不确定在文档中放置两个
s是否是一个好主意。最终,它的数据库连接会出现,但会突然消失