Hola mi error_log aumenta sin medida con un error que tengo en dos PHP.
Os adjunto el error y a qué líneas corresponde (
echo $contenido[$vCuenta]; y
if ($contenido[$vCuenta] == ' ') {):)
PHP 1:
Código Apache:
Ver original[Sun Apr 08 18:59:34 2012] [error] [client xx.x.xxx.xxx] PHP Notice: Undefined variable: contenido in /var/www/vhosts/xxxxx/httpdocs/psico.php on line 55, referer: http://www.xxxxx.es/muestra_re.php?id=66
[Sun Apr 08 18:59:34 2012] [error] [client xx.x.xxx.xxx] PHP Notice: Undefined variable: contenido in /var/www/vhosts/xxxxx/httpdocs/psico.php on line 45, referer: http://www.xxxxx.es/muestra_re.php?id=66
Código PHP:
Ver original<div id="recomendada">
<p><b>Lectura recomendada: <?php echo $titulo; ?></b></p>
<p>
<?php
$vContPalabras = 0;
$vMaxPalabras = 40;
$vCuenta = 0;
while ($vContPalabras < $vMaxPalabras) {
echo $contenido[$vCuenta];
if ($contenido[$vCuenta] == ' ') {
$vContPalabras++;
}
$vCuenta++;
}
echo '...';
?>
PHP 2:
Código Apache:
Ver original[Sun Apr 08 18:59:34 2012] [error] [client xx.x.xxx.xxx] PHP Notice: Undefined variable: contenido in /var/www/vhosts/xxxxxx.es/httpdocs/index.php on line 50, referer: http://www.google.com/m/search?aq=f&oq=&aqi=g6-k0d0t0&fkt=837&fsdt=3268&cqt=&rst=&htf=&his=&maction=&q=web
[Sun Apr 08 18:59:34 2012] [error] [client xx.x.xxx.xxx] PHP Notice: Undefined variable: contenido in /var/www/vhosts/xxxxxx.es/httpdocs/index.php on line 51, referer: http://www.google.com/m/search?aq=f&oq=&aqi=g6-k0d0t0&fkt=837&fsdt=3268&cqt=&rst=&htf=&his=&maction=&q=web
Código PHP:
Ver original<td colspan="2"><p id="texto_actualidad">
<?php
$vContPalabras = 0;
$vMaxPalabras = 30;
$vCuenta = 0;
while ($vContPalabras < $vMaxPalabras) {
echo $contenido[$vCuenta];
if ($contenido[$vCuenta] == ' ') {
$vContPalabras++;
}
$vCuenta++;
}
echo '...';
?>
¿Qué puede estar fallando?
¡Gracias!