谁会php转asp的呀,能否帮忙?

zhuangjunx 2010-08-26 11:33:41
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
$res[$line['bihua']][] = array("id"=>$line['id'],"zi"=>$line['zi']);
}

php的这个方法 转成asp的是怎么做?

...全文
260 5 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
asp查询数据库,直接使用rs.getrows就是一个二维数组
所以你直接循环这个二维数组,就是类似php那样的了
rqrq 2010-08-28
  • 打赏
  • 举报
回复
vbs的数组只有编号索引,用js来实现吧。
zhuangjunx 2010-08-26
  • 打赏
  • 举报
回复
代码太多了,不好发,麻烦下载看看。

代码下载
zhuangjunx 2010-08-26
  • 打赏
  • 举报
回复
<?php
require('inc.php');

//每部首包含笔画数
$bpanum = array(0,8,37,81,133,162,192,216,231,242,248,255,260,262,264,267);

$zwnum = array("零","一","二","三","四","五","六","七","八","九","十","十一","十二","十三","十四","十五","十六","十七");

$title = '新华字典';
if($_GET['q']){ //搜索
$q = htmlspecialchars(encodeStr(trim($_GET['q']),$code=1));
$zidianArr = getR($q);
$hotkey = hotkey();
$zidianStatus = 1;
}elseif($_GET['list']){ //列表
$lst = intval($_GET['list']);
if($lst>0 && $lst<=strlen($bpa)/3){
header("HTTP/1.1 301 Moved Permanently");
header('location: bushou_'.$lst.'.html');
}else{
header('location: ./');
}
exit;
}elseif($_GET['bushou']){ //部首列表
$lst = intval($_GET['bushou']);
if($lst=="-1"){
$bushou = "";
}elseif($lst>268){
header("HTTP/1.1 301 Moved Permanently");
header('location: ./bushou.html');
exit;
}elseif($lst==268){
$bushou = "难检字";
$zidianArr = lstBushou($lst);
}else{
$bushou = substr($bpa,$lst*3-3,3);
$zidianArr = lstBushou($lst);
}
$hotkey = hotkey();
$zidianStatus = 2;
}elseif($_GET['pinyin']){ //拼音列表
$lst = htmlspecialchars(strtolower($_GET['pinyin']));
if($lst=="index" || in_array($lst,$pya[strtoupper(substr($lst,0,1))])){
if($lst=="index"){
$pinyin = "";
}else{
$pinyin = $lst;
$zidianArr = lstPinyin($lst);
}

}else{
header("HTTP/1.1 301 Moved Permanently");
header('location: ./pinyin.html');
exit;
}
$hotkey = hotkey();
$zidianStatus = 3;
}elseif($_GET['id']){ //ID
$id = intval(base64_decode($_GET['id']));
//$id = $_GET['id'];
if($id<=0) header("location: ./");
$zidianArr = zidian($id);
if($zidianArr==false) header("location: ./");
$hotkey = hotkey($id."\t".$zidianArr['zi']);
$zidianStatus = 4;
}elseif($_GET['top']){ //笔画最多的汉字
$top = $_GET['top'];
$zidianArr = topzi($top);
$topstr = '笔画最多的汉字(前100个)';
$hotkey = hotkey();
$zidianStatus = 5;
}else{
$hotkey = hotkey();
$zidianStatus = 0;
}

function inPinyin($str){
global $pya;
foreach($pya as $value){
if(in_array($str,$value)) return true;
}
return false;
}

function getR($q,$t=0){ //搜索
global $tbname,$pya;

$sql .= 'select id,zi,bihua from '.$tbname.' where zi = "'.$q.'" or py like "%'.$q.'%" or zhengma = "'.$q.'" or sijiao = "'.$q.'" or wubi86 = "'.$q.'" or wubi98 = "'.$q.'" or cangjie = "'.$q.'" or bishun = "'.$q.'" or dianma = "'.$q.'" order by bihua limit 120';
$result = getlink($sql);
$totalNum = mysql_num_rows($result);
if($totalNum==0){
return false;
}elseif($totalNum==1){
$line = mysql_fetch_array($result, MYSQL_ASSOC);
header("location: ".base64_encode($line['id']).".html");
exit;
}
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
$res[$line['bihua']][] = array("id"=>$line['id'],"zi"=>$line['zi']);
}
$res['total'] = $totalNum;

return $res;
}

function lstBushou($id){ //部首列表
global $bpa;
global $tbname;
$c = getArr("bs_".$id,1);
if($c!=false) return $c;

$pos = substr($bpa,$id*3-3,3);

if($pos==""){
$sql = 'select id,zi,buwai,pinyin from '.$tbname.' where bushou="-" or bushou="" order by buwai';
}else{
$sql = 'select id,zi,buwai,pinyin from '.$tbname.' where bushou="'.$pos.'" order by buwai';
}
$result = getlink($sql);
$totalNum = mysql_num_rows($result);
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
if($line['pinyin']){
$line['pinyin'] =str_replace(array(" ","|"),array("",","),$line['pinyin']);
$line['pinyin'] = preg_replace('/\{\{(.*?)\}\}/',"",$line['pinyin']);
}
$res[$line['buwai']][] = array('id'=>$line['id'],"zi"=>$line['zi'],"pinyin"=>$line['pinyin']);
}
$res['total'] = $totalNum;

cacheArr("bs_".$id,$res,1);
return $res;
}

function lstPinyin($py){ //拼音列表
global $tbname;
$c = getArr("py_".$py,1);
if($c!=false) return $c;

$sql = 'select id,zi,bihua,pinyin from '.$tbname.' where py="'.$py.'" or py like "%|'.$py.'|%" or py like "'.$py.'|%" or py like "%|'.$py.'" order by bihua';
$result = getlink($sql);
$totalNum = mysql_num_rows($result);
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
if($line['pinyin']){
$line['pinyin'] =str_replace(array(" ","|"),array("",","),$line['pinyin']);
$line['pinyin'] = preg_replace('/\{\{(.*?)\}\}/',"",$line['pinyin']);
}
$res[$line['bihua']][] = array('id'=>$line['id'],"zi"=>$line['zi'],"pinyin"=>$line['pinyin']);
}
$res['total'] = $totalNum;

cacheArr("py_".$py,$res,1);
return $res;
}

function topzi($t=1){ //汉字排行
global $tbname;
$c = getArr("top",1);
if($c!=false) return $c;

if($t==1){
$sql = 'select id,zi,bihua,pinyin from '.$tbname.' order by bihua desc limit 100';
}else{
return false;
}
$result = getlink($sql);
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
if($line['pinyin']){
$line['pinyin'] =str_replace(array(" ","|"),array("",","),$line['pinyin']);
$line['pinyin'] = preg_replace('/\{\{(.*?)\}\}/',"",$line['pinyin']);
}
$res[] = $line;
}

cacheArr("top",$res,1);
return $res;
}

function zidian($id){ //某个ID
global $tbname;
$c = getArr($id);
if($c!=false) return $c;

$sql = 'select * from '.$tbname.' where id='.$id;
$result = getlink($sql);

$line = mysql_fetch_array($result, MYSQL_ASSOC);
if(!isset($line['zi'])) return false;

cacheArr($id,$line);
return $line;
}
zhuangjunx 2010-08-26
  • 打赏
  • 举报
回复
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
$res[$line['bihua']][] = array("id"=>$line['id'],"zi"=>$line['zi']);
}

php的这个方法 转成asp的是怎么做?
版本介绍 游戏发布站程序源码支持全天套黄连体广告员发布系统Ver.40 1):游戏发布类型分全天套黄[24小时套黄],全天精品,套黄,通宵固顶,通宵推荐,连体广告! 2):游戏分类支持各种游戏类型,具体操作,基本设置→游戏类型上有说明自由设置; 不要问能不能做什么游戏,现在明确告诉你,发布站程序支持任何游戏的,只要你修改下文字和LOGO即可 3):首页游戏显示天数支持今天,明天,后天,大后天几天时间,以及昨天,前天! 4):套黄游戏跟随时间轮换显示,随机排序!(随机不影响多行重复连体广告的功能) 5):通宵游戏在网站配置中自由设置时间段,只需选择通宵即可显示在套黄底部! 6):只有通过审核但未套黄,未通宵,未精品的游戏将显示在免费游戏管理中! 7):内带免费采集插件,支持传奇,天龙八部,奇迹,逐鹿,武易,传世,征途,完美,魔域,诛仙 8):支持友情链接,与大站互换连接有助于你的发布站的发展哦! 9):支持文章发布,文章没有点内容很难发展起来,每天多发几篇文章百度就常来了哦! 10):支持战歌添加,支持下载管理,支持家族添加等 11):支持图片广告,文字广告,代码样本也已经编写在内有助于你的修改! 实力一.支持员自助发布,不需要管理审核想发布就发布! 实力二.支持全套套黄连体广告! 实力三.后台一键智能发布开服信息,走在懒人时代让采集插件OUT去吧 实力四.后台支持一条广告多条发布功能 实力五.支持支付宝充值系统(效验码和ID不帮忙开通需要自己到支付宝开通) 实力六.支持后台一键批量修改开服时间,以后不凑采集无效果了,批量修改下开服时间发布站每天都能广告满屏! 还有其他功能就等您购买了自己了解吧O(∩_∩)O哈哈~!! 本程序只有以上功能,其他没提示有的等**后更新在补上! 本系统采用最新防攻击和搜索引辑而开发的新程序,全站采用HTML静态生成系统。 其他页面信息更新及修改完成,后台必须生成其他HTML页 后台地址:**/98youx 账户:admin admin 免费版本不支持任何技术,需要技术支持的请购买商业版本! 由于该程序的特殊性,无法在线升级,也不提供改版补丁,每次更新都如同一款新的程序,所以如您需要的请每次更新后都下载,需要哪个模式的就选择哪款安装架设即可。
Hait windows网站系统有点仿桌面,对于学校网站和企业政府网站应该非常不错,但是可能加载动态页面有一点点不太流畅。网站支持其它目录,这样非常有利于你在原有的网站基础上让你的网站变成桌面化。 网站采用了很多其它公共代码,后台里面可能还有很多漏洞,我没有那么好的技术能一一发现和修改,所以发出来,希望大家能帮忙改正,希望你改正后能复制一份发给我,万分感谢!! 后台地址:admin 用户名,密码: admin Hait windows v2.0更新说明 ————终于,终于将2.0弄出来了,PHP Sql    2.0功能上比1.0更好用了许多,(可以说完全不是一个档次的)1.0是asp access的,不知道的网友可以站内搜索一下,2.0在后台上花了很多功夫,前台的话,还在修改。    为了兑现诺言,今天(正月十五网上23点30分)将它发出来,其中可能还有一些瑕疵,我慢慢改进,希望大家在使用的过程中有什么发现的话,告知于我,万分感谢,下一个版本 功能将更强大,而且我还在桌面化的基础上,同时开发普通页面,网友可以根据自己喜好选择用桌面化方式浏览还是普通页面方式浏览。 下一个版本增加内容 1,员功能 2,论坛功能 3,前台完全桌面化(最大化后,能以假乱真,超仿桌面) 我的qq号码是:1606907532,1606907532@qq.com

28,409

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧