My code works ok in my local testing computer. I guess it must be some file permission problem on the remote server. THis file's permission status is 644 (even if i try to change it to 666, it doestn change, although i dont think this needs to be done since under 644 status there are user read and write permissions, and I guess the php scripts run as "user"). I have really tried reading all over the board for similar problems but I couldnt solve the problem. Below is the code that im using:
Code: Select all
<?php
function arraytofile_numr($arrayname, $filename)
//returns a file with name "$filename" made out from array "$arrayname"
{
// echo array elements
reset ($arrayname);
$fp=fopen($filename, 'w+');
while (list(, $value)=each($arrayname)) {
$inputstr= $value;
fwrite ($fp, $inputstr);
}
fclose($fp);
}
?>I really appreciate any help...