Re: php counter

From: Date: Tue, 06 Aug 2002 20:58:24 +0000
Subject: Re: php counter
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-111434@lists.php.net to get a copy of this message
The tag is IMAGE SRC not SCR, right? > Trying to test a counter using php / MS Windows 98 / Apache with three .jpg > files. > > They are named: > > 1.jpg > 2.jpg > 3.jpg > > and are stored in a folder called: > images > > which is in the same directory as Counter.txt > within > htdocs. > > I run the following script but the images do not appear. > Thanking all in advance. > Tony Ritter > ............................................................ > > <? > $counter_file="./Counter.txt"; > $image_dir="./images"; > if(!($fp=fopen($counter_file, "r")))die("Couldn't open the file"); > $counter=(int)fread($fp, 20); > fclose($fp); > > $counter++; > > for($i=0; $i<strlen($counter); $i++) > { > $image_scr=$image_dir."/".substr($counter, $i, 1).".jpg"; > $image_tag_str.="<IMG SCR=\"$image_src\" BORDER=\"0\">"; > } > > echo "You are visitor $image_tag_str"; > $fp=fopen($counter_file, "w"); > fwrite($fp,$counter); > fclose($fp); > ?> > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -Pushkar S. Pradhan

« previous php.general (#111434) next »