hello,
i have a small query. i have the following function where a file is opened and something is written to it.
function appendToLog ($filename, $data) {
//Open file
$file = fopen($filename,"aw");
//Write data
fputs($file,$data);
//Close file
fclose($file);
}
Now the first time soemthing is written to the file it works fine. but when soemthing has to be written again then it says Permission denied. the permission on the file is -rw-r--r-- when created. how do i make it rw-rw-rw- in the function.
Also i never delete this file. it always exists after i create it the first time
thanks