回收来自数据库的嵌入式YouTube视频

时间:2015-10-17 16:17:22

标签: php html mysql mysqli xampp

我正在尝试使用我的数据库回显YouTube嵌入式视频。 但我无法弄清楚我的错误在哪里..

Config.php文件:

coins :: Num a => [a] 
coins = [2, 3, 7]

change :: (Ord a, Num a) => a -> [[a]]
change n =  uniqEl (filter (\x -> sum x == n) take ()(subsequences (replic' n coins coins)))

replic' n x y | n == 1 = y
              | otherwise = replic' (n-1) x (y ++ x) 

uniqEl :: Eq a => [a] -> [a]
uniqEl [] = []
uniqEl (x:xs) = if (x `elem` xs) then uniqEl xs else x : (uniqEl xs)

在这里,我试图回应YouTube视频:

$servername = "localhost";
$username = "root";
$password = "";
$db = "dbname";

// Create connection
$conn = mysqli_connect($servername, $username, $password, $db);

// Check connection
if (!$conn) {
    die("Connection failed: " . mysqli_connect_error());
}

在回声部分,我正在回显$ row ['video'],视频是每个视频所拥有的YouTube视频代码。

但它仍然不起作用,有人可以帮助我吗?

1 个答案:

答案 0 :(得分:1)

1.检查您的浏览器源代码是否正确打印代码。

2.检查您是否在(h1h4hdj6)

之后打印视频代码https://www.youtube.com/embed/