Php 网页暂时关闭,或者可能已永久移动到其他地址。错误\u响应\u头\u被截断
我正在尝试获得一个RSS提要,我删除了所有的停止词,词干。。。但它有时会起作用。我不知道发生了什么事。有人能看到我的代码并告诉我错误在哪里吗?。请 functions.phpPhp 网页暂时关闭,或者可能已永久移动到其他地址。错误\u响应\u头\u被截断,php,rss,feed,Php,Rss,Feed,我正在尝试获得一个RSS提要,我删除了所有的停止词,词干。。。但它有时会起作用。我不知道发生了什么事。有人能看到我的代码并告诉我错误在哪里吗?。请 functions.php <?php include ("stemm_es.php"); function quitarAcento($incoming_string){ $tofind = "ÀÁÂÄÅàáâäÒÓÔÖòóôöÈÉÊËèéêëÇçÌÍÎÏìíîïÙÚÛÜùúûüÿÑñ"; $replac = "AAAAAa
<?php
include ("stemm_es.php");
function quitarAcento($incoming_string){
$tofind = "ÀÁÂÄÅàáâäÒÓÔÖòóôöÈÉÊËèéêëÇçÌÍÎÏìíîïÙÚÛÜùúûüÿÑñ";
$replac = "AAAAAaaaaOOOOooooEEEEeeeeCcIIIIiiiiUUUUuuuuyNn";
return utf8_encode(strtr(utf8_decode($incoming_string),
utf8_decode($tofind),
$replac));
}
function limpiar($String){
$String = str_replace(array('á','à','â','ã','ª','ä'),"a",$String);
$String = str_replace(array('Á','À','Â','Ã','Ä'),"A",$String);
$String = str_replace(array('Í','Ì','Î','Ï'),"I",$String);
$String = str_replace(array('í','ì','î','ï'),"i",$String);
$String = str_replace(array('é','è','ê','ë'),"e",$String);
$String = str_replace(array('É','È','Ê','Ë'),"E",$String);
$String = str_replace(array('ó','ò','ô','õ','ö','º'),"o",$String);
$String = str_replace(array('Ó','Ò','Ô','Õ','Ö'),"O",$String);
$String = str_replace(array('ú','ù','û','ü'),"u",$String);
$String = str_replace(array('Ú','Ù','Û','Ü'),"U",$String);
$String = str_replace(array('[','^','´','`','¨','~',']','"',"'",'(',')','{','}',',','.',':',';','%','-',
'#','@','|','!','·','$','&','/','?','¡','¿','+', '”', '“', '’', '‘'),"",$String);
$String = str_replace("ç","c",$String);
$String = str_replace("Ç","C",$String);
$String = str_replace("ñ","n",$String);
$String = str_replace("Ñ","N",$String);
$String = str_replace("Ý","Y",$String);
$String = str_replace("ý","y",$String);
$String = str_replace("á","a",$String);
$String = str_replace("Á","A",$String);
$String = str_replace("é","e",$String);
$String = str_replace("É","E",$String);
$String = str_replace("í","i",$String);
$String = str_replace("Í","I",$String);
$String = str_replace("ó","o",$String);
$String = str_replace("Ó","O",$String);
$String = str_replace("ú","u",$String);
$String = str_replace("Ú","U",$String);
return $String;
}
function getFeed($feed_url) {
$x = simplexml_load_string(file_get_contents($feed_url));
$stopwords = file_get_contents('stopword.txt');
$stopwords = explode(" ", $stopwords);
$t=0;
foreach($x->channel->item as $entry){
$t++;
$title = trim( strip_tags( mb_strtolower( limpiar($entry->title) ) ) );
$description = trim( strip_tags( mb_strtolower( limpiar($entry->description) ) ) );
$title = explode(" ", $title);
$description = explode(" ", $description);
for($j = 0; $j < count($title); $j++){
if($title[$j] != ""){
for($i = 0; $i < count($stopwords); $i++){
if($stopwords[$i] != ""){
$title[$j] = preg_replace("/\b$stopwords[$i]\b/i", " ", $title[$j]);
$title[$j] = stemm_es::stemm($title[$j]);
}
}
}
}
for($j = 0; $j < count($description); $j++){
if($description[$j] != ""){
for($i = 0; $i < count($stopwords); $i++){
if($stopwords[$i] != ""){
$description[$j] = preg_replace("/\b$stopwords[$i]\b/i", " ", $description[$j]);
$description[$j] = stemm_es::stemm($description[$j]);
}
}
}
}
print_r($title);
print_r($description);
}
}
?>
channel->item as$entry){
$t++;
$title=trim(strip_标签(mb_strtolower(limpiar($entry->title)));
$description=trim(strip_标签(mb_strtolower(limpiar($entry->description)));
$title=分解(“,$title”);
$description=分解(“,$description”);
对于($j=0;$j
index.php
<!DOCTYPE html>
<html class="no-js" lang="es">
<head>
<meta charset="utf-8">
<title>Inicio | Investigador</title>
</head>
<body>
<?php require "functions.php"; ?>
<?php
$feed = "http://ep00.epimg.net/rss/ccaa/valencia.xml";
if ($feed != "") {
getFeed(feed);
}
?>
</body>
</html>
Inicio |调查者
最近发布的版本中,有些用户出现了此问题。不确定是我们还是Chrome计时
它只影响到一些用户,而且只影响到Chrome,清除缓存对大多数用户有帮助,但对所有用户没有帮助
仍然在寻找一个明确的解决方案
编辑:
过了很长一段时间后,我通过更新CodeIgniter中的会话配置设置为自己解决了这个问题
我必须更新:
$config['sess_encrypt_cookie'] = FALSE;
致:
第一次登录时发生了什么,它可以正常工作,但第二次登录时与cookie发生了某种冲突
我没有弄清楚到底是什么问题,但这似乎是一些人多年来一直存在的一个基于Chrome的bug,但这方面的问题并不多。你能解释一下发生了什么,出现了什么错误等吗
$config['sess_encrypt_cookie'] = TRUE;