<?php
define('STORE', 'ratings.dat');
function put_contents($file,$content) {
$f = fopen($file,"w");
fwrite($f,$content);
fclose($f);
}
if(isset($_REQUEST["rating"])) {
$rating = $_REQUEST["rating"];
$storedRatings = unserialize(file_get_contents(STORE));
$storedRatings[] = $rating;
put_contents(STORE, serialize($storedRatings));
$average = round(array_sum($storedRatings) / count($storedRatings), 2);
$count = count($storedRatings);
$xml = "<ratings><average>$average</average><count>$count</count></ratings>";
header('Content-type: text/xml');
echo $xml;
}
?>
没有合适的资源?快使用搜索试试~ 我知道了~
jquery入门基础
共11个文件
js:4个
css:4个
html:1个
需积分: 0 18 下载量 135 浏览量
2008-10-07
10:51:15
上传
评论
收藏 71KB RAR 举报
温馨提示
jquery入门基础,jquery入门基础
资源详情
资源评论
资源推荐
收起资源包目录
starterkit.rar (11个子文件)
starterkit
css
reset.css 961B
core.css 961B
screen.css 150B
custom.js 4KB
ratings.dat 0B
screen.css 2KB
rate.php 605B
starterkit.html 15KB
jquery.js 98KB
lib
jquery.tablesorter.js 11KB
jquery.js 178KB
共 11 条
- 1
chenghaicys
- 粉丝: 3
- 资源: 17
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0