我想從我的「_images」文件夾回聲圖像的圖像,但如果我寫了下面的代碼,它只是爲我的網站:如何呼應與PHP
echo '<img src="http://mywebsite.com/mytheme/wp-content/themes/my theme/_images/project3image1.jpg">';
我已經它改變了這個,所以當別人用我的主題,它需要他們自己的網站目錄:
echo '<img src="<?php bloginfo('stylesheet_directory'); ?>/_images/project3image1.jpg">';
但一定有什麼不對的代碼時,我把和預覽我的網站,它給了我這個錯誤:
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/content/32/9825632/html/bomb/wp-content/themes/bomb/header.php on line 101
我是一個php noob所以它可能是一個明顯的錯誤!