Youtube API PHP问题

Youtube API PHP问题,php,zend-framework,youtube,http-status-code-404,zend-gdata,Php,Zend Framework,Youtube,Http Status Code 404,Zend Gdata,我从zend.com及其示例下载了Yotube API PHP库(搜索视频)。 在windows(本地主机)上,一切正常。。。 在debian服务器上上载时,请求搜索视频时会出现错误: Invalid response received - Status: 404 此错误的代码来自videO-browser.js /** * Sends an AJAX request to the server to retrieve a list of videos or * the video pla

我从zend.com及其示例下载了Yotube API PHP库(搜索视频)。 在windows(本地主机)上,一切正常。。。 在debian服务器上上载时,请求搜索视频时会出现错误:

Invalid response received - Status: 404
此错误的代码来自videO-browser.js

/**
 * 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);
}
/**
*向服务器发送AJAX请求以检索视频或视频列表
*视频播放器/元数据。将请求发送到指定的文件路径
*在同一主机上,传递指定的参数,并填充指定的
*成功后,resultDivName与ResultLS同名。
*@param{String}filePath请求应发送到的路径
*@param{String}params URL编码的POST参数
*@param{String}resultDivName用于保存结果的DIV的名称
*/
ytvbp.sendRequest=函数(文件路径、参数、resultDivName){
if(window.XMLHttpRequest){
var xmlhr=new XMLHttpRequest();
}否则{
var xmlhr=newActiveXObject('MSXML2.XMLHTTP.3.0');
}
xmlhr.open('POST',filePath,true);
setRequestHeader('Content-Type','application/x-www-form-urlencoded');
xmlhr.onreadystatechange=函数(){
var resultDiv=document.getElementById(resultDivName);
if(xmlhr.readyState==1){
resultDiv.innerHTML='Loading…';
}else if(xmlhr.readyState==4&&xmlhr.status==200){
if(xmlhr.responseText){
resultDiv.innerHTML=xmlhr.responseText;
}
}else if(xmlhr.readyState==4){
警报(“收到无效响应-状态:”+xmlhr.Status);
}
}
xmlhr.send(参数);
}

糟糕的英语,抱歉,显然,您的请求字符串传输错误(错误404=未找到Ressource)。您希望通过使用echos进行调试并在正确的位置检查本地副本和服务器副本之间的差异