Php Wordpress文件下载仅在Firefox中没有扩展名
Wordpress中下载按钮的代码在Chrome中工作,但在Firefox中,图像下载时没有扩展名Php Wordpress文件下载仅在Firefox中没有扩展名,php,html,wordpress,firefox,Php,Html,Wordpress,Firefox,Wordpress中下载按钮的代码在Chrome中工作,但在Firefox中,图像下载时没有扩展名 <div class="download-button"> Download: <a target="_self" href=" <?php $src = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full', false ); ech
<div class="download-button">
Download: <a target="_self"
href=" <?php
$src = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full', false );
echo $src[0]; // the url of featured image?> "
download="<?php echo get_the_title(); ?>"
width="<?php echo $src[1]; ?>"
height="<?php echo $src[2]; ?>"
title="<?php echo get_the_title(); ?>" >
<?php echo $src[1]; ?>x<?php echo $src[2]; ?>
</a>
</div>
下载:
如果使用“将目标另存为”,它确实有一个扩展名
<div class="download-button">
Download: <a target="_self"
href=" <?php
$src = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full', false );
echo $src[0]; // the url of featured image?> "
download="<?php echo get_the_title(); ?>"
width="<?php echo $src[1]; ?>"
height="<?php echo $src[2]; ?>"
title="<?php echo get_the_title(); ?>" >
<?php echo $src[1]; ?>x<?php echo $src[2]; ?>
</a>
</div>
为什么下载时会保存扩展名?上面代码的实际HTML输出是什么?标题中是否有扩展名,如果没有,则是firefox正确工作。上面代码的实际HTML输出是什么?标题中是否有扩展名,如果没有,则是firefox正确工作