我試圖實現下面的腳本來打印所謂的頁面上的圖像,但它相反導致問題的頁面。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