dongxietao0263 2015-03-27 22:46
浏览 46
已采纳

PHP错误:意外T_CONSTANT_ENCAPSED_STRING [关闭]

I get syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in my echo. Can't figure out what is causing it. Any thoughts?

    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条回答 默认 最新

  • drc15469 2015-03-27 22:50
    关注

    Missing a dot . after $_COOKIE['HL'] on this line:

    '
    <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>    
    

    An "unexpected string" error generally means you've got a 'string' bumped up against something that it shouldn't be next to. In this case, a variable when there should be a concatenating dot.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 Stata 面板数据模型选择
  • ¥20 idea运行测试代码报错问题
  • ¥15 网络监控:网络故障告警通知
  • ¥15 django项目运行报编码错误
  • ¥15 请问这个是什么意思?
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services
  • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏
  • ¥15 模糊pid与pid仿真结果几乎一样
  • ¥15 java的GUI的运用