我试图实现下面的脚本来打印所谓的页面上的图像,但它相反导致问题的页面。PHP打印脚本错误
<?php
if ($currentpage == '/services/') {
print("<img src="path/to/services.png" alt=""/>");
},
if ($currentpage == 'contact.php') {
print("<img src="path/to/image.png" alt=""/>")
},
else {
print("<img src="path/to/image.png" alt=""/>")
}
?>
的错误信息是:
Parse error: syntax error, unexpected T_STRING in /home/master/public_html/wp-content/themes/siteripe-001/othe-rpages.php on line 173
按照你的建议使用它,但它仍然不打印图像,它显示它是一个死链接。 – 2012-07-29 01:23:12
检查图像路径和文件名。 – Jocelyn 2012-07-29 08:03:55