个性化阅读
专注于IT技术分析

我的page.php遇到问题

我正在设置我的wordpress网站, 已经完成了将html转换为php文件的操作, 但是却收到了以下错误代码:

语法错误, 我的网站url / page.php中第2行出现意外的’echo'(T_ECHO)

这是我的第一行和第二行, 你知道我要更改的内容吗?抱歉, 到处都是, 这是我第一次编写任何东西。

<? php
echo '<div class="slicknav_menu"><div class="slicknav_brand"><a 
href="https://twitter.com/pipdig" target="_blank" rel="nofollow noopener"><i 
class="fa fa-twitter"></i></a><a href="https://instagram.com/pipdig" 
target="_blank" rel="nofollow noopener"><i class="fa fa-instagram"></i></a><a 
href="https://www.facebook.com/pipdig" target="_blank" rel="nofollow 
noopener"><i class="fa fa-facebook"></i></a><a 
href="https://www.pinterest.com/pipdig/" target="_blank" rel="nofollow 
noopener"><i class="fa fa-pinterest"></i></a></div><a href="#" aria- 
haspopup="true" role="button" tabindex="0" class="slicknav_btn 
slicknav_collapsed"><span class="slicknav_menutxt"><i class="fa fa-bars"></i> 
</span><span class="slicknav_icon"><span class="slicknav_icon-bar"></span> 
<span class="slicknav_icon-bar"></span><span class="slicknav_icon-bar"> 
</span></span></a><ul role="menu" aria-hidden="true" style="display: none;" 
class="slicknav_nav slicknav_hidden"><li class="menu-item menu-item-type- 
post_type menu-item-object-page menu-item-128"><a tabindex="-1" 
role="menuitem" href="../../about/index.html">About</a></li>';

#1


跟随

<?php ?>

<div class="slicknav_menu"><div class="slicknav_brand"><a 
href="https://twitter.com/pipdig" target="_blank" rel="nofollow noopener"><i 
class="fa fa-twitter"></i></a><a href="https://instagram.com/pipdig" 
target="_blank" rel="nofollow noopener"><i class="fa fa-instagram"></i></a><a 
href="https://www.facebook.com/pipdig" target="_blank" rel="nofollow 
noopener"><i class="fa fa-facebook"></i></a><a 
href="https://www.pinterest.com/pipdig/" target="_blank" rel="nofollow 
noopener"><i class="fa fa-pinterest"></i></a></div><a href="#" aria- 
haspopup="true" role="button" tabindex="0" class="slicknav_btn 
slicknav_collapsed"><span class="slicknav_menutxt"><i class="fa fa-bars"></i> 
</span><span class="slicknav_icon"><span class="slicknav_icon-bar"></span> 
<span class="slicknav_icon-bar"></span><span class="slicknav_icon-bar"> 
</span></span></a><ul role="menu" aria-hidden="true" style="display: none;" 
class="slicknav_nav slicknav_hidden"><li class="menu-item menu-item-type- 
post_type menu-item-object-page menu-item-128"><a tabindex="-1" 
role="menuitem" href="../../about/index.html">About</a></li>
<?php

我在上面所做的是退出php模式, 然后使用html, 然后再次进入php模式以执行PHP功能等。

赞(0)
未经允许不得转载:srcmini » 我的page.php遇到问题

评论 抢沙发

评论前必须登录!