count .php source code: Copy the code as follows: count .php source code: Copy the code as follows:

Home >Backend Development >PHP Tutorial >The efficacy and function of American ginseng tablets and how to consume them. How to implicitly call the php program

The efficacy and function of American ginseng tablets and how to consume them. How to implicitly call the php program

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-07-29 08:39:241193browse

Calling method:

count.php source code:

Copy code The code is as follows:


$file_name = "count.txt";
$fp = fopen($file_name,"r"); //Open the file to read the current count
$count = fread($fp, filesize($file_name));
fclose ($fp);
$count++; //Increase the count by 1
$fp = fopen($file_name, "w"); //Open the file again and write the updated count
fwrite($fp, $count);
fclose($fp);
echo "document.write('".$count."')"; //Output JavaScript code and return count
?>

The above introduces the efficacy and function of American ginseng tablets and how to consume them. The method of implicitly calling the PHP program includes the efficacy and role of American ginseng tablets and how to consume them. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
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