0

zend.com 및 그 예제에서 Yotube API PHP (비디오 검색)를 다운로드했습니다. 창에 (로컬 호스트가) 모든 요청 검색 비디오에 거기에 데비안 서버에 잘 ... 업로드를 작동하고, 오류 제공합니다Youtube API PHP 문제

Invalid response received - Status: 404 

코드 비디오-browser로에서이 오류를

(Ressource 찾을 수 없습니다 = 오류 404)
/** 
* Sends an AJAX request to the server to retrieve a list of videos or 
* the video player/metadata. Sends the request to the specified filePath 
* on the same host, passing the specified params, and filling the specified 
* resultDivName with the resutls upon success. 
* @param {String} filePath The path to which the request should be sent 
* @param {String} params The URL encoded POST params 
* @param {String} resultDivName The name of the DIV used to hold the results 
*/ 
ytvbp.sendRequest = function(filePath, params, resultDivName) { 
    if (window.XMLHttpRequest) { 
    var xmlhr = new XMLHttpRequest(); 
    } else { 
    var xmlhr = new ActiveXObject('MSXML2.XMLHTTP.3.0'); 
    } 

    xmlhr.open('POST', filePath, true); 
    xmlhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 

    xmlhr.onreadystatechange = function() { 
    var resultDiv = document.getElementById(resultDivName); 
    if (xmlhr.readyState == 1) { 
     resultDiv.innerHTML = '<b>Loading...</b>'; 
    } else if (xmlhr.readyState == 4 && xmlhr.status == 200) { 
     if (xmlhr.responseText) { 
     resultDiv.innerHTML = xmlhr.responseText; 
     } 
    } else if (xmlhr.readyState == 4) { 
     alert('Invalid response received - Status: ' + xmlhr.status); 
    } 
    } 
    xmlhr.send(params); 
} 

나쁜 영어 죄송

+0

코드를 게시하십시오. –

답변

1

Apperently, 귀하의 요청 문자열이 어떻게 든 잘못 전달된다. 디버깅을위한 echos와 올바른 위치를 사용하여 로컬 복사본과 서버 복사본간에 정확히 다른 점을 확인하려고합니다.