开发者

Handling a few different types of data

What is the best way to handle a link that has a video within and then embed it?

I considered storing the link in the database and then showing开发者_Go百科 it embedded.

How could I write code to handle the embedded side of the link?


If $youtube_link contains link gotten from DB, then it would look like this:

<?php
echo '<object width="640" height="385">
<param name="movie" value="'.$youtube_link.'"></param>
<param name="allowFullScreen" value="true"></param>
<param name="allowscriptaccess" value="always"></param>
<embed src="'.$youtube_link.'" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object>';
?>
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜