开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜