CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Beginner:
Header and Footer script question - please help



Apr 26, 2000, 6:48 PM

Post #1 of 2 (685 views)
Header and Footer script question - please help Can't Post

I'd like to ask about what is flook file? I heard about that but I dont know what's it.
If I use header and footer script (SSI) to call header & footer file - what happent if alot of people access this site. Please help.


Apr 27, 2000, 2:31 AM

Post #2 of 2 (685 views)
Re: Header and Footer script question - please help [In reply to] Can't Post

You mean flock right?
<BLOCKQUOTE><font size="1" face="Arial,Helvetica,sans serif">code:</font><HR>

open(FILE, "myfile.txt") or die;
flock FILE, 2;
...some code...
Ok the above code locks the file exclusivly. Meaning that only one process can use this file at a time and the rest have to wait till the current process unlocks the file. Closing the file unlocks the file or you can unlock it using:
<BLOCKQUOTE><font size="1" face="Arial,Helvetica,sans serif">code:</font><HR>

flock FILE, 8;</pre><HR></BLOCKQUOTE>

The structure for this function is:


Possible operations:
1 = Share the file.
2 = Lock exclusivly
8 = Unlocks file

There is a another which is 4, however this does not verify that the file is locked.

Hope this was what you were looking for.


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives