Ver Mensaje Individual
  #1 (permalink)  
Antiguo 17/07/2008, 15:28
mamogo
 
Fecha de Ingreso: febrero-2008
Mensajes: 88
Antigüedad: 16 años, 2 meses
Puntos: 1
Pregunta problemas con abrir archivos

Hola Compañeros!
tengo un proble.
cuando copio y pego este codigo me de errores

Código HTML:
<?php $destino= "COMERCIOS/infodalma.php";
$archivo = "/ip/dalma.txt";
//leemos la ip
//cambiamos permisos a 777
//chmod($archivo,0777);
//direccion camara
$abre = fopen($archivo,"r");
$total = fread($abre, filesize($archivo));
fclose($abre);
$puerto="8081";
//$url="http://one-server.no-ip.info:8081/";
$url="http://".$total.":".$puerto;
echo $destino;
echo  $archivo;
echo  $total;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>
</head>

<body>
</body>
</html> 
el maldito error

Código PHP:
Warningfopen() [function.fopen]: Unable to access /ip/dalma.txt in /usr/home/visitasonline.es/web/p1.php on line 7

Warning
fopen(/ip/dalma.txt) [function.fopen]: failed to open streamInvalid argument in /usr/home/visitasonline.es/web/p1.php on line 7

Warning
filesize() [function.filesize]: Unable to access /ip/dalma.txt in /usr/home/visitasonline.es/web/p1.php on line 8

Warning
filesize() [function.filesize]: stat failed for /ip/dalma.txt in /usr/home/visitasonline.es/web/p1.php on line 8

Warning
fread(): supplied argument is not a valid stream resource in /usr/home/visitasonline.es/web/p1.php on line 8

Warning
fclose(): supplied argument is not a valid stream resource in /usr/home/visitasonline.es/web/p1.php on line 9
COMERCIOS
/infodalma.php/ip/dalma.txt 
me podeis ayudar a solventar porque sucede esto si en otra pagina va bien,
queiro copiar y pegar en varias paginas, pero ocurre el error
gracias
salu2