我正在尝试使用来自我的php的字符串加载,youtube IFrame,我知道该字符串获取的是视频网址,但是当放入html时,视频将无法加载。
我尝试过的方法。该URL是完整的youtube URL,没有缩短。
<iframe width="560" height="315" src="<?=$purl?>" frameborder="0" allowfullscreen></iframe>
<iframe width="560" height="315" src="<?=$_SESSION['theurl']?>" frameborder="0" allowfullscreen></iframe>
<iframe width="560" height="315" src="<?$purl?>" frameborder="0" allowfullscreen></iframe>
也许我做错了吗?我也尝试了旧的对象方法,但结果仍然相同。
最佳答案
如果您要将YouTube链接设置为iframe src,则它应如下所示:
http://www.youtube.com/embed/bFXb9F
关于php - YouTube URL iframe问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7769463/