在获得输出时打印而不是所需的输出代码

时间:2017-03-24 05:49:10

标签: php

我添加php代码的那一刻,我没有得到所需的输出。没有它我得到了所需的输出。我无法找到它背后的原因..任何人都可以帮助我,为什么我的代码不能正常工作,因为我无法找到它背后的单个问题。

   
<?php 
//create select queries

 ?>
<!Doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>Shout It!</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
    <div class="container">
    <header>
        <h1> SHOUT IT! Shoutbox</h1>
    </header>
    <div id="shouts">
        <ul>
            <li class="shout" <span> 10:15PM - </span> Brad: Hey what are you guys upto?</li>
            <li class="shout" <span> 10:15PM - </span> Brad: Hey what are you guys upto?</li>
            <li class="shout" <span> 10:15PM - </span> Brad: Hey what are you guys upto?</li>
            <li class="shout" <span> 10:15PM  - </span> Brad: Hey what are you guys upto?</li>
        </ul>
    </div>
<div id="input">
    <form method="post" action="process.php"> 
    <input type="text" name="user" placeholder="Enter your Name">
    <input type="text" name="message" placeholder="Enter your message">
    <br/>
    <input class ="shout-btn" type="submit" name="submit" value="Shout it Out!">
    </form>
</div>
    </div>
</body>

</html>

1 个答案:

答案 0 :(得分:0)

我猜您的列表看起来不正确。您缺少关闭列表项开头的>符号。

    <ul>
        <li class="shout" <span> 10:15PM - </span> Brad: Hey what are you guys upto?</li>
        <li class="shout" <span> 10:15PM - </span> Brad: Hey what are you guys upto?</li>
        <li class="shout" <span> 10:15PM - </span> Brad: Hey what are you guys upto?</li>
        <li class="shout" <span> 10:15PM  - </span> Brad: Hey what are you guys upto?</li>
    </ul>

......应该......

    <ul>
        <li class="shout"> <span> 10:15PM - </span> Brad: Hey what are you guys upto?</li>
        <li class="shout"> <span> 10:15PM - </span> Brad: Hey what are you guys upto?</li>
        <li class="shout"> <span> 10:15PM - </span> Brad: Hey what are you guys upto?</li>
        <li class="shout"> <span> 10:15PM  - </span> Brad: Hey what are you guys upto?</li>
    </ul>