为了账号安全,请及时绑定邮箱和手机立即绑定

在 PHP 中显示数据库中的 Youtube 视频

在 PHP 中显示数据库中的 Youtube 视频

PHP
互换的青春 2023-09-08 14:09:27
我发现我的代码中出现了奇怪的情况。我在 PHP 页面上显示数据库中的 YouTube 视频。我将 YouTube 视频 ID 保存在我的数据库中。所有 YouTube 视频都运行良好,除了一个 ( https://www.youtube.com/watch?v=_oFsdDHuhQQ&feature=youtu.be ) 该视频未在我的代码上运行。我检查了这个在 WordPress 上运行的视频,但没有以这种方法运行。我不知道为什么会发生这种情况,也许视频 ID 是从“_”(下划线)开始的,有人可以帮忙吗?<div class="row">            <?php                $video_query="select * FROM care_class_topic_file_upload WHERE care_topic_id='$_GET[care_topic_id]' AND care_class_topic_file_type=1";                $video_result= mysqli_query($con,$video_query);                 while($row_video = mysqli_fetch_assoc($video_result))                 {                ?>            <div class="col-6 col-sm-3 col-md-4" style="padding:10px;">                <div class="embed-responsive embed-responsive-16by9">                  <?$page="https://www.youtube.com/embed/$row_video[care_class_topic_file_video_url]";?>                    <iframe class="embed-responsive-item" src=<? echo $page; ?> frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>                </div>            </div>                    <?php                 }            ?>                    </div>
查看完整描述

目前暂无任何回答

  • 0 回答
  • 0 关注
  • 69 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信