Join Up!
96807 members and counting!

 
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links 
search for in the  
previousfiletypefnmatchnext
Last updated: Tue, 29 Oct 2002
view the printer friendly version or the printer friendly version with notes or change language to Czech | Finnish | German

flock

(PHP 3>= 3.0.7, PHP 4 )

flock -- Bloqueo de ficheros portable y asesorado

Description

bool flock ( int fp, int operation)

PHP soporta un método portable de bloquear ficheros completos de manera asesorada (lo que significa que todos los programas que acceden tienen que usar el mismo modo de bloqueo o éste no funcionará).

flock() opera sobre fp el cual debe ser un apuntador a un fichero abierto. operation toma uno de los siguientes valores:

  • Para que adquiera un bloqueo compartido (lectura), fija operation a 1.

  • Para adquirir un bloqueo exclusivo (escritura), fija operation a 2.

  • Para liberar un bloqueo (compartido o exclusivo), fija operation a 3.

  • Si no quieres que flock() bloquee mientras está activado, suma 4 al valor de operation.

flock() permite establece un modelo simple de lectura/escritura el cual puede usarse en prácticamente cualquier plataforma (incluyendo la mayoria de sistemas Unix e incluso Windows).

flock() devuelve TRUE en caso de éxito y FALSE en caso de error (ej. cuando no se puede establecer un bloqueo).

User Contributed Notes
flock
add a note about notes
There are no user contributed notes for this page.
previousfiletypefnmatchnext
Last updated: Tue, 29 Oct 2002
Copyright © 2001, 2002 The PHP Group
All rights reserved.
This mirror generously provided by: http://phpbuilder.com/
Last updated: Thu Oct 31 18:34:28 2002 EST