Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
array_unique
#5
Quote:What you doing wrong is, you open a file for writing only "w", using the letter a == "append" will add content to the open handle.
So it should be.
PHP Code:
<?php
$logfile
'make2.html';
$IP $_SERVER['REMOTE_ADDR'];
$logdetails=  date("F j, Y, g:i a") . ': ' '<a href=http://dnsstuff.com/tools/city.ch?ip='.$_SERVER['REMOTE_ADDR'].'>'.$_SERVER['REMOTE_ADDR'].'</a>';
$fp fopen($logfile"a"); 
fwrite($fp$logdetails);
fwrite($fp"<br>");
fclose($fp); 
$data1 file("make1.html");
$data2 file("make2.html");
file_put_contents('Database.html'implode(''array_unique(array_merge($data1,$data2))));
unlink('make1.html');
unlink('make2.html');
$ourFileName "make1.html";
$ourFileHandle fopen($ourFileName'a') or die("can't open file");
fclose($ourFileHandle);
$ourFileName "make2.html";
$ourFileHandle fopen($ourFileName'a') or die("can't open file");
fclose($ourFileHandle);
?>
If so then its still having the same problem.
[Image: Scorpion-Sig3.png]
Reply


Messages In This Thread
array_unique - by Scorpion - 12-12-2009, 01:54 PM
RE: array_unique - by Socrates - 12-12-2009, 01:56 PM
RE: array_unique - by Scorpion - 12-12-2009, 02:06 PM
RE: array_unique - by Gaijin - 12-12-2009, 02:14 PM
RE: array_unique - by Scorpion - 12-12-2009, 02:24 PM
RE: array_unique - by Gaijin - 12-12-2009, 02:33 PM
RE: array_unique - by Scorpion - 12-13-2009, 07:58 AM
RE: array_unique - by Gaijin - 12-13-2009, 08:13 AM
RE: array_unique - by Scorpion - 12-13-2009, 10:46 AM
RE: array_unique - by Gaijin - 12-13-2009, 11:11 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)