Wordpress PHP在使用file\u get\u内容时注释掉了
下面的wordpress短代码在Wordpress PHP在使用file\u get\u内容时注释掉了,php,html,wordpress,file-get-contents,Php,Html,Wordpress,File Get Contents,下面的wordpress短代码在single.php中正确运行 <?php echo do_shortcode( '[contact-form-7 id="13" title="KB EN Contact"]' ); ?> php显示为注释掉的HTML。正确显示周围的HTML元素 <section id="contact-after-post" class="clearfix"> <h3 id="contact-after-post-title">
single.php中正确运行
<?php echo do_shortcode( '[contact-form-7 id="13" title="KB EN Contact"]' ); ?>
php显示为注释掉的HTML。正确显示周围的HTML元素
<section id="contact-after-post" class="clearfix">
<h3 id="contact-after-post-title">Didn't find what you were looking for?</h3>
<div id="contact-after-post-number">
</div>
<div id="contact-after-post-number-click">
<div id="number-left">
</div>
<div id="number-right">
</div>
</div>
<div id="contact-after-post-form">
<!--?php echo do_shortcode( '[contact-form-7 id="13" title="KB EN Contact"]' ); ?-->
</div>
</section>
没有找到你要找的东西?
为什么会这样?为什么外部文件的行为会发生变化?您可以尝试使用include()函数代替file\u get\u contents()
代码:
<?php include("en-contact.php"); ?>
提示:WordPress中有
<?php include("en-contact.php"); ?>