It works when auth is set to 1 because it just creates a file for each post. When it is set to 0, I am appending information to a file. During the first post, it works fine, after that, I can't post to it or nothing, it just hangs. I have tried the script with >>, +<, >+, and +>>. Any ideas on why this doesn't work after the first post? I have also tried running chmod as it is commented out above. Thanks, Jason Bush# 0 to go directly to the web, or 1 to authorize first $auth = 0; if ($auth == 0) { LINE: for ($i=0; defined($i); $i++){ unless (-e "./data/$month.dat") { open (FILE, "+>>./data/$month.dat"); flock(FILE,2) or next LINE; print FILE "$event\|$month $day $year\|$place\|$addr\|$desc\|$contact\ +|$phone\|$county\|"; close FILE; last LINE; } } # Tried to add this to get access to file, but didn't work # chmod 0666, "./data/$month.dat"; }elsif ($auth == 1){ LINE: for ($i=0; defined($i); $i++){ unless (-e "./tempevents/$i.dat") { open (FILE, ">./tempevents/$i.dat"); flock(FILE,2) or next LINE; print FILE "$event\|$month $day $year\|$place\|$addr\|$desc\|$contact\ +|$phone\|$county\|"; close FILE; last LINE; } } } # End
In reply to File not responding after first append by jrbush82
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |