![]() |
|
#1
|
||||
|
||||
file_get_contents()OK, I have had ONLY good experiences with using :
string file_get_contents ( string filename [, int use_include_path]) but yesterday I thought up a script that would involve reading ( i.e. file_get_contents() ) and ALSO writing into the same file in some circumstances. My question is, do I have to flock() the file when writing or would it not matter? __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#2
|
||||
|
||||
|
why should you want to use flock()
just use file_put_contents() to write to the file |
|
#3
|
||||
|
||||
Is that available already??? I didn't bother to check on my server (PHP 4.3.1) - I thought it was CVS only...__________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#4
|
||||
|
||||
|
I tried it at my box, it worked...
but I'm running a cvs version.... I checked with 4.3.2-RC2 but it's still not there.. sorry about that. http://php.net/manual/en/function.file-put-contents.php says what it does. just some normal file functions... |
|
#5
|
||||
|
||||
|
Nope, it doesn't work for me either:
Code:
__________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
Recent GIDBlog
Last Week of IA Training by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The