Usage
Include ("counter.php");
Counter (__file__);//Add a count to the file
if ($PHP _self== "/index.php")
{
$count =counter ("Index_count");//Add a count to the home page
}
Else
{
$count =counter ("Index_count", "", 0);//Get home count
}
echo "You
PHP Implementation Counter Method Summary, PHP counter Summary
The example of PHP implementation counter is described in this paper. Share to everyone for your reference. Specific as follows:
This collection of three PHP counter code, all of them
Most people are very yearning to use the database to do their own counters, message book, Forum and other things, this article will introduce my self-made counter program.
First set up the 0~9 10 gif digital pictures, put in the IMG folder, and then
Counter | Web Visitor counter is the most direct way for a web visitor to know the popularity index of the page or website. Especially those who want to make money from the Web, the number of visitors is the best way to find advertisers. Of course,
Copy CodeThe code is as follows:
/ * Simple implementation of recording data using a text file */$counter = 1;
if (file_exists ("Mycounter.txt")) {
$FP =fopen ("Mycounter.txt", "R");
$counter =fgets ($FP, 9);
$counter + +;
Fclose ($FP);
}
$FP
PHP simple counter instance program. In php, we sometimes write a simple website page access Statistician. the following section describes how to use PHP to implement counter code. I hope this method will be helpful to you. In php, we sometimes
This article provides a detailed analysis of the PHP counter implementation code. For more information, see
The code is as follows:
/* Simple implementation of recording data using text files */$ Counter = 1;
If (file_exists ("mycounter.txt "
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.