的index.php獲取未定義指數:URL從阿賈克斯的結果
<h1>Input the URL of the Video you want:</h1>
<input type="text" name="video" id="video">
<input type="submit" name="submit" value="Submit">
<div id="showvideo"></div>
<script>
$(document).ready(function() {
$('#video').change(function() {
$.ajax({
type: "GET",
url: "youtube.php",
date: {'url' : "$('#video').val()"},
success: function(data){
$('#showvideo').html(data);
}
});
});
});
</script>
youtube.php
if($_GET['url']){
$url = $_GET['url'];
$video = new Youtube($url);
echo $video->getVideo();
}
當傳中的網址,我得到
「的通知:未定義的索引:第41行的/Applications/MAMP/htdocs/youtube.php中的網址「。
我跟着指示從this tutorial,它應該是正確的....
LOL ...謝謝! – Joshua
Ok.Wlcome .. :-)將其標記爲正確答案@Joshua –