Ver Mensaje Individual
  #1 (permalink)  
Antiguo 08/05/2008, 18:46
kp44361
 
Fecha de Ingreso: abril-2007
Mensajes: 33
Antigüedad: 17 años, 11 meses
Puntos: 0
Problemas al abrir un archivo

Hola gente! estoy haciendo un ejercicio que necesito abrir un archivo de texto (txt_vector.txt). La cuestion cuando pruebo mi spript me da el siguiente error:

Warning: file(txt_vector.txt) [function.file]: failed to open stream: No such file or directory in C:\Archivos de programa\EasyPHP 2.0b1\www\PHP-2\clase-03\includes\03.php on line 2

Warning: asort() expects parameter 1 to be array, boolean given in C:\Archivos de programa\EasyPHP 2.0b1\www\PHP-2\clase-03\includes\03.php on line 3

Warning: Invalid argument supplied for foreach() in C:\Archivos de programa\EasyPHP 2.0b1\www\PHP-2\clase-03\includes\03.php on line 10

El script php es el siguiente:

Código PHP:
<?php
$vector
=file("txt_vector.txt");
asort($vector);
    
?><table border="1px">
      <tr>
        <td>vector</td>
           <td>Contenido</td>
        </tr>
    <?php
    
foreach($vector as $k => $new_vector) {
        
?>
        <tr>
            <td><?php print "\$vector[$k]"?></td>
            <td><?php print "$new_vector<br>"?></td>
        </tr><?php
    
}
?></table>
Si alguien me puede orientar cual es mi error, se los agradeceria!