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 对接wps接口实现获取元数据
  • ¥20 给自己本科IT专业毕业的妹m找个实习工作
  • ¥15 用友U8:向一个无法连接的网络尝试了一个套接字操作,如何解决?
  • ¥30 我的代码按理说完成了模型的搭建、训练、验证测试等工作(标签-网络|关键词-变化检测)
  • ¥50 mac mini外接显示器 画质字体模糊
  • ¥15 TLS1.2协议通信解密
  • ¥40 图书信息管理系统程序编写
  • ¥20 Qcustomplot缩小曲线形状问题
  • ¥15 企业资源规划ERP沙盘模拟
  • ¥15 树莓派控制机械臂传输命令报错,显示摄像头不存在