【发布时间】:2015-06-28 00:29:57
【问题描述】:
我不知道为什么,但我正在尝试制作这个 joomla 模板和徽标图像,如果您可以在下面的第一个代码中看到它(这是来自网站元素检查器的代码) ) 徽标图像的链接有些奇怪,在下面的第二个代码(index.php 中的代码)中有“?php echo $...”我真的不知道出了什么问题,拜托帮帮我,这让我发疯了。
第一个代码 (这是网站元素检查器的代码)
<div class="logo">
<img src="/joomla/ /joomla" alt="Logotipo">
<h1>Localhost</h1>
<p>Lorem ipsum dolor sit amet.</p>
</div>
第二个代码 (index.php 中的代码)
<div class="logo">
<img src" <?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/img/logo.png" alt="Logotipo">
<h1>Localhost</h1>
<p>Lorem ipsum dolor sit amet.</p>
</div>
【问题讨论】:
-
试试
<img src="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template; ?>/img/logo.png" alt="Logotipo"> -
我做到了,但仍然无法正常工作
-
请将
var_dump($this->baseurl, $this->template;):添加到该 div 之前的索引中,并将其打印的内容放入您的问题中。