[PHP] Undefined index a different problem

2003-01-07 Thread Mekrand
my problem is, i have a script that works well before php 4.2.3 its sth like that {.. for($i=0; $icount($line); $i++); // loop line numbers ... } //2nd part { echo ($i); } now i changed second part as; echo($GLOBALS[i]); and it gives me notice that undefined index i. how can i solve this

Re: [PHP] Undefined index a different problem

2003-01-07 Thread Mekrand
thanks but this time it gives 2 error, undefined variable i, undefined index i for $GLOBALS[$i] Marek Kilimajer [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Mekrand wrote: my problem is, i have a script that works well before php 4.2.3 its

[PHP] filemtime -help

2002-12-12 Thread Mekrand
i have a problem with filemtime function, i want script print out the date of file last modified. here is code, $fp=fopen(ex.txt,r); echo date(j F Y H:i, filemtime($fp)); fclose($fp); it turns out; 1 January 1970 02:00 everytime , i modified file, but this doesnt change, lastly i deleted and

[PHP] filemtime -help

2002-12-12 Thread Mekrand
i have a problem with filemtime function, i want script print out the date of file last modified. here is code, $fp=fopen(ex.txt,r); echo date(j F Y H:i, filemtime($fp)); fclose($fp); it turns out; 1 January 1970 02:00 everytime , i modified file, but this doesnt change, lastly i deleted and

[PHP] Re: filemtime -help

2002-12-12 Thread Mekrand
thanks @ Edwin [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello, Mekrand [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... i have a problem with filemtime function, i want script print out the date of fi

[PHP] strstr-pls help

2002-12-11 Thread Mekrand
i couldnt find out what is wrong with this script , can anbody explain $ip=fopen(ip.txt, 'r+'); $adam=fread($ip,filesize($adam)); fclose($ip); if(stristr($adam,$_SERVER[REMOTE_ADDR])) echo an entry submitted from this ip already; else { .. //block 1 .. } the ip.txt 10.8.0.21 10.8.5.21 10.8.7.21

[PHP] hi

2002-12-11 Thread Mekrand
test -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] strstr-pls help

2002-12-11 Thread Mekrand
thanks, it was very silly mistake, but it doesnt work, there in nothing wrong with if statement, moreover, ?php $ip=fopen(ip.txt, 'r+'); $k=filesize($ip); $adam=fread($ip); fclose($ip); echo $adam; ? i think there is something wrong with fread, is there another way to reading a file, and return

Re: [PHP] strstr-pls help

2002-12-11 Thread Mekrand
sorry the code was ?php $ip=fopen(ip.txt, 'r+'); $k=filesize($ip); $adam=fread($ip,$k); fclose($ip); echo $adam; ? that doesnt work. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] strstr-pls help

2002-12-11 Thread Mekrand
i solved problem, -not a good solution- i changed only $adam=fread($ip,filesize($ip)); to $adam=fread($ip,1024); i dont understand what is wrong with filesize($ip) . i got this from php.net and i thought it was valid. link: http://www.php.net/manual/en/function.fread.php quote: ?php // get

Re: [PHP] strstr-pls help

2002-12-11 Thread Mekrand
yes you are right, im very pensive today, :) thanks chris and mako Chris Wesley [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Wed, 11 Dec 2002, Mekrand wrote: i solved problem, -not a good solution- i changed only $adam=fread($ip,filesize($ip)