[英]Store Videos in MySQL Output in HTML Via PHP
You can simply create a column/field of type VARCHAR(300) called video_url that will be used to store the video URLs.您可以简单地创建一个名为video_url 的VARCHAR(300) 类型的列/字段,用于存储视频 URL。 Then you retrieve and play the videos in your HTML using the following code:
然后使用以下代码检索并播放 HTML 中的视频:
<button onclick="document.getElementById('video_player').style.display='block'">
Play Video
</button>
<video id="video_player" style="display:none;" width="320" height="240" controls autoplay>
<source src="<?=video_url?>" type="video/mp4">
Your browser does not support the video tag.
</video>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.