我正在为朋友建立网站,而YouTube播放器API遇到了一些麻烦。到目前为止,这是我嵌入的HTML IFrame:
<body>
<iframe style="max-width: 480px" width="100%" height="360" src="http://www.youtube.com/embed?max-results=1&controls=0&showinfo=0&rel=0&listType=user_uploads&list=UCvDJ_vg2dics1kmwUPnTo_A" frameborder="0" allowfullscreen></iframe>
</body>
Run Code Online (Sandbox Code Playgroud)
由于他的YouTube频道使用了新的ID系统,并且在“ user_uploads”类型中未检测到该ID系统,因此无法使用该功能。有任何想法吗?
这个问题实际上是关于PHP的糟糕做法.我正在学习如何用这种语言编写代码,我已经可以用Lua和Python编写代码了.当一个if语句被告知在Lua中"什么都不做"时,你只会说"返回",但我知道这在PHP中不起作用.我一直在使用print(),但我明白这可能是不好的做法,我想知道是否有一个无所事事的功能.
if (condition) { //If condition is met
print(""); //Do Nothing
} else {
//Run the function;
}
Run Code Online (Sandbox Code Playgroud)
先感谢您.