Home > Backend Development > PHP Tutorial > PHP web page number counter code_PHP tutorial

PHP web page number counter code_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-13 10:58:07
Original
825 people have browsed it

php web page number counter code This php counter is a simple counter code used to count the number of visits to a web page. It uses txt text files and the php fopen function to operate.

php tutorial web page number counter code
This php counter is a simple counter code used to count the number of visits to a web page. It uses txt text files and the php fopen function to operate.
*/

$log = 'log/count.txt';
$count_img = 'img/counter';

$fp = @fopen($log, "r+") or die($log.'The data file cannot be opened!');
$count = fgets($fp, 64);
flock($fp, 2);
$count = (int)$count + 1;
rewind($fp);
fputs($fp, $count);
fclose($fp);
if($conf_showcount == '1'){
for ($i=0; $i $num = substr($count, $i, 1);
echo '';
}
}

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/632044.htmlTechArticlephp web page number counter code This php counter is a simple number used to count the number of visits to a web page The programmer code uses txt text files and the php fopen function to operate. php tutorial...
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template