Tema: leer archivo
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 18/07/2008, 14:58
mamogo
 
Fecha de Ingreso: febrero-2008
Mensajes: 88
Antigüedad: 16 años, 2 meses
Puntos: 1
De acuerdo leer archivo

Hola tengo un problemilla,
leeo un txt con fopen(), que estan en el mismo directorio.
pero si el txt esta en un directorio y la pagina php en otro me dice que no lo encuentra,
os pongo el ejemplo a ver si aguno me puede ayudar
gracias

ESTA ES LA PAGINA PHP QUE ESTA EN UNA CARPETA LLAMADA COMERCIOS

Código PHP:
<?php 
$archivo 
"/ip/manu11.txt";      ESTA ES LA RUTA DEL ARCHIVO TXT
//leemos la ip
$abre fopen($archivo"r");
$total fread($abrefilesize($archivo));
fclose($abre);
$puerto="8081";
$url="http://".$total.":".$puerto;
 echo 
$url
?> 
<!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>php</title>
</head>
<body>
</body>
</html>
PERO COMO OS DIGO, SI EL TXT ESTA EN ESA MISMA CARPETA COMERCIOS NO HAY PROBLEMAS PERO COMO LO TENGO EN LA CARPETA "IP" ME DICE QUE NO EXISTE Y NO LO ENCUENTRA
GRACIAS DE ANTEMANO

Última edición por mamogo; 18/07/2008 a las 15:26