如何在代码中嵌入include?
**我希望在$content之前显示此页面(tabtab.php(
page tabtab.php当前未显示此代码。**
if(!empty($mp3Link)) {
$linkHtml = '
<a class="w3-black" href="#ucomment">com</a>
' . include (TEMPLATEPATH . '/tabtab.php') . '
';
};
$mp3Info =
"<h2><p><span>1 : </span><span>$mp3_caption</span></h2></p>";
return $imageTag.$mp3Info."<br/>".$playerTag."<br/>".$linkHtml.$content;
}
return $content;
}
add_filter('the_content', 'append_mp3_file');
您需要使include函数成为PHP的一部分,而不是字符串
if(!empty($mp3Link)) {
$linkHtml = '
<a class="w3-black" href="#ucomment">comen</a>
<span id="ucomment"></span>
' . include (TEMPLATEPATH . '/single_ads.php') . ' **// I want to embed it here**
';
};