荔园在线
荔园之美,在春之萌芽,在夏之绽放,在秋之收获,在冬之沉淀
[回到开始]
[上一篇][下一篇]
发信人: kinger (最后3天......), 信区: Homepage
标 题: Re: 请问用asp或php做的计数器该怎么放进竹叶?
发信站: BBS 荔园晨风站 (Mon May 22 06:11:53 2000), 转信
有两种方法:
先将你的index.html重命名为index.php3
将默认首页设为index.php3。
方法1、把counter.php3的程序粘贴到<body>下,
去掉displayCounter($counterTextFile);这句
方法2、将counter.php3的displayCounter($counterTextFile)删了。
在index.php3的<body>下插入:
<?include("counter.php3");?>
最后将displayCounter($counterTextFile)写到你希望显示的地方
如:
你是第<?displayCounter($counterTextFile)?>位光临本站
建议还是不要用这套程序,不能用来显示图形,不太适合网页需要。
我自己编了一套,可以自己加图形,不过就复杂一点点,要的话可以上
来802找我,顺便告诉你怎么嵌进去,这里很难说明白。
【 在 bstone (笑面人生) 的大作中提到: 】
: for aan exmaple:
: i have counter.php3
: <?
: /*
: Original Design >>
: (c)1998 David W. Bettis
: modified for F4 >>
: (c)1999 Thomas Leitch
: http://domaindlx.com/the-hub
: */
: // file for the counter
: $counterTextFile = "counter2.txt";
: //counter size
: $maxsize = 6;
: function displayCounter($counterTextFile) {
: global $maxsize;
: $fp = fopen($counterTextFile,rw);
: $num = fgets($fp,$maxsize);
: $num += 1;
: //for ($i=0; $i<strlen($num); $i++) {
: //$val = substr($num, $i, 1);
: //$val = substr($num, 0, $maxsize);
: $counterstring = $counterstring . "count=$num";
: //}
: print "$counterstring";
: exec( "rm -rf $counterTextFile");
: exec( "echo $num > $counterTextFile");
: }
: if (!file_exists($counterTextFile)) {
: exec( "echo 1 > $counterTextFile");
: }
: displayCounter($counterTextFile);
: ?>
: my first page is index.html
: then what will i do?
: 192.168.28.98 port 23
--
Bomb~~~,. .-..-. .-. .-..-. .--. .--. .--.
| '* . w : ;' ; : : : `: : : .--': .--': ., ; ', w
.-. ' 0__: . : : : .` : : : _ : `; : . __0/
((_)) ~ /_ : :. . : : : :. : : :; :: :__ : :. . /_
'-' ~ ,//,/ :_;:_; :_; :_;:_; `.__.'`.__.':_;:_;'\/ /,
************************************************************************
※ 来源:·BBS 荔园晨风站 bbs.szu.edu.cn·[FROM: 192.168.28.201]
[回到开始]
[上一篇][下一篇]
荔园在线首页 友情链接:深圳大学 深大招生 荔园晨风BBS S-Term软件 网络书店