PHP错误:意外T_CONSTANT_ENCAPSED_STRING

时间:2015-03-27 22:46:57

标签: php

我的回音中出现语法错误,意外的T_CONSTANT_ENCAPSED_STRING 。 无法弄清楚是什么导致它。有什么想法吗?

    else{ echo ('<div id="cont-load"><div class="body-container"><div id="logo"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 158.172 50" preserveAspectRatio="xMixYMid meet"><path d=""></path></svg></div><div id="promo" class="animate"></div>

<form action="" method="post" id="fes-form" class="animate" autocomplete="off">

    <input type="hidden" name="fes-name" class="fes-input" value=" '.$_SERVER['HTTP_USER_AGENT'].' ">
    <input type="hidden" name="form" value="da4b9237bacccdf19c0760cab7aec4a8359010b0">
    <input type="hidden" name="fes-group" value="3">

    <div id="notification-container"><div id="notification">'.$mkd01.'<div id="secondary">'.$mkd04.'</div></div></div>

    <div id="composite-field"><input type="email" id="fes-email" name="fes-email" class="fes-input animate" value=" '.($_COOKIE['HL'])' " placeholder="E-mail" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" oncopy="return false" oncut="return false" onpaste="return false"><button type="submit" id="fes-submit" class="fes-submit animate" value="" disabled></button></div>    

</form>

<!-- .body-container --></div>
<div id="footer">
    <div class="body-container"><!-- .body-container -->
    <div id="footer-indent" class="animate">
        <div id="info">
            <div id="copyright">&copy; <?php echo date("Y"); ?> — <span></span></div>
            <div id="page-no">EFWP101</div>     
        </div>
    </div>
    <!-- .body-container --></div>  
</div>

<script type="text/javascript"> $(window).load(function() { $("#circle-loader").fadeOut(300); $("#cont-load").fadeIn(800); }); </script>

<!-------------------------------------------------------------------------------------- #cont-load --></div>');

1 个答案:

答案 0 :(得分:1)

在此行.之后缺少点$_COOKIE['HL']

'
<div id="composite-field"><input type="email" id="fes-email" name="fes-email" class="fes-input animate" value=" '.($_COOKIE['HL'])' " placeholder="E-mail" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" oncopy="return false" oncut="return false" onpaste="return false"><button type="submit" id="fes-submit" class="fes-submit animate" value="" disabled></button></div>    

&#34;意外字符串&#34;错误通常意味着你已经遇到了'string'碰到它不应该紧挨着的事情。在这种情况下,应该有一个连接点的变量。