Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

Luan Patric

Erro PHP Delimiter must not be alphanumeric

Recommended Posts

Bom dia, meu problema é o seguinte

 

instalei um script de noticias nos meu site, porem sem exibe esta mensagem de erro nas paginas

 

Warning: preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash in /home/vol11/xtreemhost.com/xth_12059475/htdocs/noticia/inc/functions.inc.php on line 744

 

gostaria de saber como resolve-lo, segue abaixo a linha onde está o erro.

 

////////////////////////////////////////////////////////
// Function: cache_remover
// Description: êàêà÷èñòèëüùèê

function cache_remover($alone = ''){

$fdir = opendir(rootpath.'/cache');
while ($file = readdir($fdir)){
if ($file != '.' and $file != '..' and $file != '.htaccess'){
if ($alone){
if (preg_match($alone.'/(.*).(short|full)./i', $file)){         <<<----------------------- esta é a linha 744
@unlink(rootpath.'/cache/'.$file);
}

if (!preg_match('/.(short|full)./i', $file)){
@unlink(rootpath.'/cache/'.$file);
}
}

if (!$alone){
@unlink(rootpath.'/cache/'.$file);
}
}
}

return true;
}

Compartilhar este post


Link para o post
Compartilhar em outros sites

qual o contenudo de $alone?

Compartilhar este post


Link para o post
Compartilhar em outros sites

o formato da sua ER parece errado. da um echo em $alone.

Compartilhar este post


Link para o post
Compartilhar em outros sites

veja se resolve.

 

if(preg_match("/$alone \/(.*).(short|full)./i", $file)){

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.