我正在设置我的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="http://www.srcmini.com/#" 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="http://www.srcmini.com/about/index.html">
About<
/a>
<
/li>
';
#1【我的page.php遇到问题】跟随
<
?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="http://www.srcmini.com/#" 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="http://www.srcmini.com/about/index.html">
About<
/a>
<
/li>
<
?php
我在上面所做的是退出php模式, 然后使用html, 然后再次进入php模式以执行PHP功能等。
推荐阅读
- 通过自定义分类将Woocommerce产品按类别分组
- Gulp没有错误,但SASS没有编译成CSS
- WP重力表添加无显示
- Google Chrome本地主机错误NET::ERR_CERT_AUTHORITY_INVALID,但没有关闭选项
- 为WordPress自定义页面模板赋予外观编辑器标题
- Wordpess模板中特色图像下方的鬼空白
- 从单个帖子中获取WordPress类别
- 获取作为小部件放置在WordPress中我的页脚区域中的图像的URL
- 从WordPress高级自定义字段数组中获取正确的图片网址()