图像路径中的错误,图像未显示在Wordpress帖子和页面中

时间:2011-10-21 11:47:47

标签: php wordpress

显示

<img height="136" width="207" alt=" " class="portfolio" src="http://domain-name.com/wp-content/themes/Modest_v1.4/timthumb.php?src=http://farm7.static.flickr.com/6129/6021782390_76c3477fcd.jpg&h=136&w=207&zc=1&q=90" />

我想用

<img height="136" width="207" alt=" " class="portfolio" src=http://farm7.static.flickr.com/6129/6021782390_76c3477fcd.jpg" />

我使用以下内容显示缩略图,但图像的src未正确返回:

print_thumbnail(
  $thumb,
  $thumbnail["use_timthumb"],
  $post_title,
  $width,
  $height,
  'Featured');

我怎么能这样做。请帮助我。

1 个答案:

答案 0 :(得分:0)

这可能是您的问题中的复制和粘贴错误,但您在src=

的开头错过了双引号

即:

<img height="136" width="207" alt=" " class="portfolio" src=http://farm7.static.flickr.com/6129/6021782390_76c3477fcd.jpg">

应该是:

<img height="136" width="207" alt=" " class="portfolio" src="http://farm7.static.flickr.com/6129/6021782390_76c3477fcd.jpg">

我同样可能误解了你的问题..:o /