Webiter
09-03-2011, 01:50 PM
I am trying to test the ArdGuest - Free PHP Guestbook Script on a production server before installing on website.
I get the following PHP Warning: flock() expects parameter 1 to be resource, boolean given in C:\CustomerData\shopdemo.webitry.net\index.php on line 421
View at www.shopdemo.webitry.net\index.php (http://www.shopdemo.webitry.net/index.php)
I have line 421 marked in the code below.
if (!is_spam($newdata)) {
$tambah = fopen($data_file,"a");
if (strtoupper($os)=="WIN") {
line 421 if (flock($tambah,LOCK_EX)) {
fwrite($tambah,$newdata);
flock($tambah,LOCK_UN);
}
What is causing the error and how can it be corrected?
I get the following PHP Warning: flock() expects parameter 1 to be resource, boolean given in C:\CustomerData\shopdemo.webitry.net\index.php on line 421
View at www.shopdemo.webitry.net\index.php (http://www.shopdemo.webitry.net/index.php)
I have line 421 marked in the code below.
if (!is_spam($newdata)) {
$tambah = fopen($data_file,"a");
if (strtoupper($os)=="WIN") {
line 421 if (flock($tambah,LOCK_EX)) {
fwrite($tambah,$newdata);
flock($tambah,LOCK_UN);
}
What is causing the error and how can it be corrected?