i have a function:
function delITEM(){
global $conf;
$id = evalQUERY("id");
$content = file($conf[myDataFile] );
$size = count($content);
$fp = @fopen($conf[myDataFile].".tmp", "w+");
for($i=0; $i<count($content); $i++):
$myLINES[$i] = explode("|", $content[$i]);
if($myLINES[$i][0] != $id):
fputs($fp,$content[$i]);
endif;
endfor;
fclose($fp);
unlink($conf[myDataFile] );
rename($conf[myDataFile] .".tmp", $conf[myDataFile] );
}
Returns this:
Warning: Supplied argument is not a valid File-Handle resource in /home/.../shared.inc.php on line ...
Warning: Unlink failed (Permission denied) in /home/.../shared.inc.php on line ...
Warning: Rename failed (No such file or directory) in /home/.../shared.inc.php on line ...
This only occurs on the production server (after uploading to server, under linux).
But, all is well on my local machine (localhost, with apache for windows).
Help appreciated.