編輯:我重新安裝了 Xampp 并再次更改了 httpd.conf 檔案,結果仍然無緣無故
我正在制作一個 SEO youtube 視頻網站,這個程序是把鏈接放在按鈕上,網站就會分析。 第一階段我想獲取標題、描述、視圖、喜歡等。然后列印這些資料
第二階段,然后是 API 與 Google 趨勢,以檢查它是否格式正確、標題和描述是否良好,然后給他 100 分的分數此外,如果有人可以給我建議,或者是否有更好的流程來做到這一點(在尋找最佳 SEO 關鍵字和 API 谷歌趨勢的術語)
單擊按鈕后,我在嵌入 Youtube 視頻 url 時遇到問題<Directory我收到此錯誤訊息
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Allow from all
Require all granted
這是我的 php 代碼
$input_Url_data = '';
/* store the link of the video in a variable */
$input_Url_data = $_GET['url'] ;
echo $input_Url_data ;
echo '<span> <?php echo $input_Url_data ; ?></span>';
$id_position= '';
/* get the Video ID when the user click the button and make sure it's GET */
if($_SERVER['REQUEST_METHOD'] == "GET" and isset($_GET['submit'])){
/* triming the link to get the id */
echo "</br >" ;
echo $input_Url_data . "Button clicked" ;
$id_position = strstr($input_Url_data,"=");
$id_position = trim($id_position, "=" );
/* embed the the link by the id */
echo '<iframe width="560" height="315" src="<?php echo "https://www.youtube.com/embed". $id_position ; ?> "title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>' ;
}
這是來自 xampp localhost 的網站

uj5u.com熱心網友回復:
你可以試試這個嗎?
echo '<iframe width="560" height="315" src="<?php echo "https://www.youtube.com/embed/". $id_position ; ?> "title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>' ;
uj5u.com熱心網友回復:
問題不在于 xampp,但在看了很多文章之后,我找到了一種在屬性中使用退格鍵的嵌入 Youtube 視頻的方法,我什至不知道為什么,但它正在作業
echo "<iframe position=\"center\"allow=\"accelerometer\"; gyroscope; width=\"420\" height=\"315\" src=\"http://www.youtube.com/embed/$ytcode\" frameborder=\"0\" allowfullscreen></iframe>";
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/365766.html
