Home >php教程 >php手册 >隐性调用php程序的方法,调用php

隐性调用php程序的方法,调用php

WBOY
WBOYOriginal
2016-06-13 09:01:38862browse

隐性调用php程序的方法,调用php

本文实例讲述了隐性调用php程序的方法。分享给大家供大家参考。具体如下:
复制代码 代码如下:

<&#63;php 
$file_name = "count.txt"; 
$fp = fopen($file_name,"r"); //打开文件读入当前计数 
$count = fread($fp, filesize($file_name)); 
fclose($fp); 
$count++; //计数加1 
$fp = fopen($file_name, "w");
//再次打开文件写入更新后的计数 
fwrite($fp, $count); 
fclose($fp); 
echo "document.write('".$count."')";
//输出JavaScript代码,返回计数 
&#63;> 

希望本文所述对大家的php程序设计有所帮助。

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