是否可以将 php 文件传递​​给 html5 音频 src 属性?

Is it possible to pass a php file to html5 audio src attribute?

在我的 php 代码中,我有一个音频标签:

'<audio src="song.php" />'.$fallback.'</audio>'

在 "song.php" 中,我尝试了不同的方法,但没有任何效果:

include "thesong.mp3";
readfile("thesong.mp3");
echo "thesong.mp3";

这可能吗?

您可以在 PHP 文件中执行以下操作。

header('Content-Disposition: inline;filename="thesong.mp3"');