I'm using a audio in my web page i need to play it first time but not on page refresh in php
I'm using a audio in my we开发者_运维技巧b page i need to play it first time but not on page refresh in php
HOW do you play audio?
Apart from that: use a session to save that the page has been loaded and don't play audio on the second load.
<?php
session_start();
if(!isset($_SESSION['audioplayed'])){
// add code to play audio
$_SESSION['audioplayed'] = true;
}
?>
you just need to store a boolean in SESSION.
精彩评论