use Img source with php variable
我在这里有一个小问题,我相信这是一个简单的,但我在 PHP 可怕。
我正在使用一个 WP 插件,它在某个时刻将第一个图像附加到一个帖子,在我的情况下,用户在业务提交时上传的图片(它是一个业务目录插件)。
我不想要,相反,我想要 thumbshots.com 生成的缩略图。我的代码看起来像这样 (我替换了$thumbnail的 defaul 值):
if (!$thumbnail && wpbdp_get_option('use-default-picture'))
$thumbnail = 'http://images.thumbshots.com/image.aspx?cid=HIPFHapOLHw%3d&v=1&w=283&url=URLHERE';
现在,而不是 URLHERE,应该放置一个实际的 URL,列表的一个。
<?php echo wpbusdirman_the_listing_meta('single'); ?>
我该怎么做?
非常感谢!
$thumbnail = 'http://images.thumbshots.com/image.aspx?cid=HIPFHapOLHw%3d&v=1&w=283&url=' . wpbusdirman_the_listing_meta('single');
或
$thumbnail = "http://images.thumbshots.com/image.aspx?cid=HIPFHapOLHw%3d&v=1&w=283&url=$wpbusdirman_the_listing_meta('single');
?
READ:http://phphowto.blogspot.com/2006/12/concatenate-strings.html本站系公益性非盈利分享网址,本文来自用户投稿,不代表边看边学立场,如若转载,请注明出处
评论列表(45条)