3 回答
TA贡献1853条经验 获得超9个赞
您已经在字符串引号 ( 'not executable string') 中编写了所有内容,因此解释器将其读取为字符串,而不是可执行代码。
也不需要echo使用 PHP来处理纯 HTML。
请按以下步骤操作:
<p><a href="/Confusing_English/A_Lot_Of_Many.html"><strong> A Lot Of & Many </strong></a></p>
<p><a href="/Confusing_English/Already.html"><strong> Already </strong></a></p>
<?php include 'Include/adsense.php'; ?>
解释
有一个小代码示例:
<?php // start tag
echo 'This is not executable'; // it will just show on your screen "This is not executable"
include 'Include/adsense.php'; // let's consider is as command, PHP parser will read it as a single command, in this case it tells to include given file
echo 'Not executable either'; // part inside quotes is not executable, so it will output on the screen "Not executable either"
?> // end tag
我认为您应该阅读一些有关 PHP 基础知识的文章。下面的链接(w3schools 在某些情况下不是很好,但对于基础知识,我认为它很好)。
TA贡献1843条经验 获得超7个赞
您正在<?php输入一个已经从 PHP 输出的字符串,
只需将您的代码更改为
<?php
echo '
<p><a href="/Confusing_English/A_Lot_Of_Many.html"><strong> A Lot Of & Many </strong></a></p>
<p><a href="/Confusing_English/Already.html"><strong> Already </strong></a></p>
';
include 'Include/adsense.php';
?>
TA贡献1811条经验 获得超6个赞
试试这个:
<?php
echo '<p><a href="/Confusing_English/A_Lot_Of_Many.html"><strong> A Lot Of & Many </strong></a></p><p><a href="/Confusing_English/Already.html"><strong> Already </strong></a></p>';
include 'Include/adsense.php';
?>
- 3 回答
- 0 关注
- 177 浏览
添加回答
举报