Current location - Music Encyclopedia - QQ Music - The background music of the web page requires only one play. How to write PHP code?
The background music of the web page requires only one play. How to write PHP code?
you don't need PHP

directly <; Bgsound loop="" src= "music address" />

where loop=" "means no loop. loop="5" means loop 5 times. loop="-1 "means loop all the time.

If you have to use PHP (it's really not necessary! ). That is

<; ? php

echo '< Bgsound loop="" src= "music address"/>' ; >