Probleema sekojosha:
Shiim koda rindinjaam buutu jaanolasa IP adrese no temp.txt faila,
tad ieksh log.txt faila jaasameklee identiska IP adrese (taada pati kaa
temp.txt failaa)
un jaaizdzēš taa no log.txt faila.
Itkaa jau vienkaarshi, BET tas skripts nedarbojas :(

The problem is that str_replace isn't working preperly:
The whole idea of the script (below) is that it reads the IP address from
the temp.txt file,
then looks for identical IP address in log.txt file and deletes this IP
address from the log.txt file.
P.S.
temp.txt file has only one IP address, but log.txt file has many different
IP addresses.


$connect_temp_ip = fopen('temp.txt','r');
$temp_ip = fread($connect_temp_ip,filesize('temp.txt'));
fclose($connect_temp_ip);

$connect_log = fopen('log.txt','a+');
$empty = fread($connect_log,filesize('log.txt'));
$empty = str_replace($temp_ip,"",$empty);
fwrite($connect_log, $empty);
fclose($connect_log);


Thank you very much,
Lab.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to