Re: [phplib] Abrir y leer un Fichero Local From: Holger Blasum (blasum <email protected>)
Date: 05/25/00

> Sé que esto lo leéis muchos hispanohablantes,
o hispanoentendientes, pero tengo que respondarte en ingles...

>
> Necesito programar un script en PHP alojado en un servidor y abrir con él un fichero que está en el disco duro del ordenador donde se ejecuta el script (por ejemplo, C:\Mis Documentos\Prueba\datos.txt), quiero abrir y listar el contenido de este fichero.
Strictly speaking, the computer which executes the script is the server, NOT the client. The only thing that is passed over the web is ready HTML. Otherwise this would be a security risk for the client. (Sensu strictu, lo que ejecuta el script es el servidor, no es el client. Los datos transferados per web exclusivamente consisten de HTML. Otramente habia un gran riesgo de securidad per el client. Solamente si el user del client *voluntariamente* utiliza la capabilitad "upload" del Browser, sea posible transferir ficheros; PHP tambien sostiene la generacion de HTML que hace el Browser indicar un boton upload, fonciones vea pasaje subsequente).

But what you can do is (a) ask the client to (consciously) upload a file via browser upload (see PHP standard documentation part III (Features) "Handling file uploads" (Chapter 18)) probably the best solution, (b) use Cookies to store a user id (see PHPLIB documentation) if the information you want to store in the file was just something like a user id (from the context of your question I guess rather not).
>
> Gracias.

De nada, HTH, Holger

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>