IE中,快捷键是CTLR+F5.

     Firefox中,快捷键是CTLR+SHIFT+R.
其实本质是:
Mysql查询从以往常规的的Limit:
$offset*($page-1),$offset
0,20
20,20
40,20
........
变为了:
永远的:
0,20 ,但前面有一个:where id>动态的数值,这个id是有索引的,所以,查询起来更快一些。
这里的Id是经过计算后的一个数值,主要是它用到了索引,所以在大数据量下快了不是一星半点。
=========================================================

阅读全文
FCKeditor 2.6.4 released 之前版本,全部存在严重漏洞,请立即检查您的服务器、程序中是否调用了FCKeditor编辑器,如果存在,请升级到 2.6.4 released版本。
如果不需要上传功能,请将上传功能相关文件删除,如果需要上传功能,请严格限制上传文件后缀,并配置目录权限,禁止上传目录的PHP、ASP、JSP执行权限。



我们发现在一些产品中集成了带有严重漏洞的 FCKeditor 富文本编辑器。请管理员和程序员自查自己的系统、程序。



下月开始,系统部将对服务器上的 FCKeditor 进行专项扫描,届时如果发现仍然存在漏洞的FCKeditor,将对相关责任人进行相应处理。





FCKeditor是一款流行的富文本编辑器,还支持强大的文件上传功能,可以工作在asp,aspx,php,perl,python等脚本环境,由于用户多

功能强大,所以也成为了黑客重点攻击对象。



一些程序员喜欢将某个版本的FCKeditor打包,每次程序都调用这个版本,一些程序也会直接集成该编辑器,往往这种习惯都

导致将一个旧版本的编辑器嵌入到了程序中.



漏洞示例(asp下):

http://www.xxx.com/admin/FCKeditor/editor/filemanager/browser/default/browser.html?Type=../&Connector=connectors/asp/connector.asp

将type改为../,这样将跳出目录文件类型的限制,还可以进行目录遍历.

即使做了不让跳转,配合服务器的一些缺陷也可以得到webshell,比如Windows2003服务器使用fckeditor建立一个xx.asp的目录,那么向

这个目录下上传任意文件,比如jpg(包含可执行脚本代码),都可以被服务器执行.

webshell地址:

http://www.xxx.com/shell.cer



漏洞示例(jsp下):

查看配置和列出目录下的文件:

http://www.xxx.com/fckeditor/editor/filemanager/browser/default/connectors/jsp/connector?



Command=FileUpload&Type=Image&CurrentFolder=%2F

webshell地址:

http://www.xxx.com/fckeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/jsp/connector



漏洞示例(php下):

fckeditor采用黑名单方式进行过滤,Windows下上传xxx.php+空格即可绕过检测.

另外PHP版本对媒体类型没有做任何限制,可以上传任意文件.



以上漏洞均在最新版本(2.6.4)中解决,可以在http://www.fckeditor.net/download下载到最新版本.





另外一些fckeditor的设置,如果你不提供上传服务,或者有更好的上传方案,那删除掉目前的上传功能是非常必要而且彻底的!(删除FCKeditor\editor



\filemanager).



根目录下的fckconfig.js可以进行具体的设置,根据以下开关来限制上传的风险(多一种类型就多一种风险,没必要的请关闭)

FCKConfig.LinkBrowser = true;

FCKConfig.ImageBrowser = true ;

FCKConfig.FlashBrowser = true ;

FCKConfig.LinkUpload = true ;

FCKConfig.ImageUpload = true ;

FCKConfig.FlashUpload = true ;



对你存储上传文件的目录,比如UserFilesPath = "~/UserFiles",禁止下面的脚本文件执行.



新版本中提供这么个函数:

private bool CheckAuthentication()

{

// WARNING : DO NOT simply return "true". By doing so, you are allowing

// "anyone" to upload and list the files in your server. You must implement

// some kind of session validation here. Even something very simple as...

//

// return ( Session[ "IsAuthorized" ] != null && (bool)Session[ "IsAuthorized" ] == true );

//

// ... where Session[ "IsAuthorized" ] is set to "true" as soon as the

// user logs in your system.



return false;

}



去掉注释,写入

try{

return ( Session[ "IsAuthorized" ] != null && (bool)Session[ "IsAuthorized" ] == true ;

}

catch{return false;}



在登录后台成功的地方写入session,Session["IsAuthorized"] = true;即可,这样就不会任何人都可以进行上传等操作了.





PS:FCKeditor检测路径关键字editor/filemanager, 另外fckconfig.js 是编辑器的配置文件,里面有允许&拒绝上传的文件类型配置等,这个文件基本不会

   改名.

PS2:因为FCKeditor的广泛使用,黑客仍然会重点攻击该编辑器,所以不推荐使用该程序,建议使用内部开发的一些富文本编辑器

在FROM表单提交时,浏览器会自动对提交内容进行转码,会将除“- ”,“_”,数字和字母之外的所有字符进行%形式的URL编码,其中空格会被转换成“+”。
在PHP中函数urlencode对字符串URL编码的处理方式同浏览器相同,所以如果对一个字符串进行2次或2次以上的urlencode将会把空格转换成“+”
例:$str = "ce shi";
echo urlencode($str);// ce+shi
echo urlencode(urlencode($str));//ce%2bshi
echo urlencode(urlencode(urlencode($str)));//ce%2bshi
%2b在服务器接收到后会解码为“+”
若使用rawurlencode则会直接将空格转换为%20,不存在此问题

但是:
使用utf-8模式对空格先编码然后再解码后得到的不是空格字符,而是一个代码为160的char字符,如果不注意这一点将导致对空格判断的错误,我没有试验在其他encoding下的效果。
程序中使用空格分割字符串分隔符数组现在是这样:new char[3] { ' ', ' ',Convert.ToChar(160) }.
其中第一个是半角空格,第二个是全角空格,第三个就是Convert.ToChar(160)
import flash.net.NetConnection;
import flash.net.NetStream;
import flash.net.URLRequest;
Server:red5 flash media server2-3 flashcom
arsort.php
<?php
$str = array(1548940117=>'1183888',1377417885=>'879126');
print_r($str);
arsort($str);
print_r($str);

?>

result:
0> php arsort.php
Array
(
    [1548940117] => 1183888
    [1377417885] => 879126
)
Array
(
    [1548940117] => 1183888
    [1377417885] => 879126
)

这个结论是正确的结果,但是假如我们的文件编码是gbk编码,而我们的输出键值是utf-8的编码,如:'1183888'  '879126'是utf-8的字符串时候,那就会出现通过arsort排序出现错误的情况,于是我们只好这样:
      
         foreach($userscoreinfo as $key =>$values)
         {
             $userscoreinfo[$key] = (int)$values;
         }

强制转为int类型即可!!!
人生的快乐在于追逐你的敌人,抢夺他们的财物,搂抱他们的妻子——成吉思汗
都说社会主义发展是摸着石头过河,但怎么能摸着奶头过河呢?
虚无是上帝给予人最大的惩罚──他让人自己把自己剥夺得精光
对于这些农村的家庭而言,孩子不上学是等着穷,而孩子一上学那就是马上穷
有的人你看了一辈子,却忽视了一辈子;有的人你看了一眼,却影响你一生;有的人热情的为你快乐,却被你悄悄冷落;
技术本身很重要,但如果不能商业化就没有价值。
不要害怕失去,或许,过程很难熬,但是,总有一天会过去。感冒也会随着时间,身体而产生了抗体,慢慢的忘记,成为美好的回忆。
能被感动,说明它提供了你生活中所没有的体验
教会我们生活的,是生活本身。教会我们爱情的,一定也会是爱情本身。所谓,经历即财富
这个世界,通常是只见新人笑,不见旧人哭的。更何况,当初,做新人欢笑时,未必就怜悯过旧人的悲痛欲绝。活该
人生一世,来去都那样匆匆,爱情的离合、存无,那样短暂也为正常。
路边的野花不要采,是因为,作为男人,有责任培育、呵护家花,毕竟,不论家花名贵是否,或者凋零与否,这花,曾经是你自己选择,并且亲手栽下的。
男人呀,如果你想你的亲生儿子不象你,那你娶非处女,有科学依据的,非纯女生的孩子跟她的第一个男人想象
爱一个,并不知晓你爱的人。就像你喜爱一件衣服一样,你只管的喜爱,别求它回敬你的爱。因为它不是活物,它不知晓你爱,它不懂得你爱
站着做人跪着做事
没有起色时,嫌他爬行太久没站立,你就弃他而去。这也就看出来你不是真善之辈
http://www.leitie.com/show/1369.html
未来的世界:方向比努力重要,能力比知识重要,健康比成绩重要,生活比文凭重要,情商比智商重要!” 阅读全文
删除 core 文件
# find ~ -name core -exec file {} \; -exec rm -i {} \;
查看使用文件的进程
# fuser -u /usr/my_application/foo
搜索字符串
#grep "hello world" `find ./ -name "*" -print -exec file {} \; |grep text | cut -d ':' -f 1`
目录
#alias dir='ls -Lla|grep ^d'

输出 IP 地址
#ifconfig | grep "inet addr" | grep -v "127.0.0.1" | awk '{print $2;}' | awk -F':' '{print $2;}'
按文件长度排序
#ls -l | grep ^- | sort -nr -k 5 | more
#ls -lR | grep ^- | sort -nr -k 5 | more

二进制文件中的可打印字符
# strings name of binary file
一个月的最后一个星期天执行任务:
18 * * * 0 [`date "+%d"` -gt 24] && /path/to/script

修改扩展名:
# for f in *.abc; do mv $f `basename $f .abc`.def ; done

查看硬盘情况:(Solaris)
# iostat -En

整个目录树拷贝:
# cd
# find . -depth -print | cpio -pudm

按长度排序目录下所有文件
# du -a | sort -n -r | more

检查文件内每行是否有相同列数
#awk '{print NF}' test.txt |sort -nu|more

去除空行
#sed -e '/^[ ]*$/d' InputFile >OutputFile

查看进程占用的对应文件 inode 号(Solaris)
#/usr/proc/bin/pfiles

删除指定用户的所有进程
# kill -9 `ps -fu username |awk '{ print $2 }'|grep -v PID`



Bash 操作快捷键:
ctrl-l -- clear screen
ctrl-r -- does a search in the previously given commands so that you don't
have to repeat long command.
ctrl-u -- clears the typing before the hotkey.
ctrl-a -- takes you to the begining of the command you are currently typing.
ctrl-e -- takes you to the end of the command you are currently typing in.
esc-b -- takes you back by one word while typing a command.
ctrl-c -- kills the current command or process.
ctrl-d -- kills the shell.
ctrl-h -- deletes one letter at a time from the command you are typing in.
ctrl-z -- puts the currently running process in background, the process
can be brought back to run state by using fg command.
esc-p -- like ctrl-r lets you search through the previously given commands.
esc-. -- gives the last command you typed.

文件名里的空格替换为下划线
# for i in $1 ; do mv "$i" `echo $i | sed 's/ /_/g'` ; done

查看远程主机时间
# telnet remotehostname 13|grep :

只显示 top 命令的states 行
#while true; do top -d 2 | col -b | grep states; sleep 10; done

加速显示 tar 文件内容
# tar tvfn

让 目录名也能 Spell Check
#shopt -s cdspell
当输错命令时,系统会自动进入类似的目录

查看 Sun 服务器型号
# /usr/platform/`uname -m`/sbin/prtdiag -v | grep `uname -m`

在vi 中一行文字前后添加字符
:/^\(.*\)/s//我要 \1 添加/

查找某包含字符串(Verita)软件包的详细信息 (Solaris)
pkginfo -l `pkginfo | grep -i VERITAS | awk '{print $2}'`

Sun 的一大堆脚本
http://www.sun.com/bigadmin/scripts/index.html
linux date得到上一小时的时间:
date -d "-1 hour" "+%Y-%m-%d-%H"

直接输出时间和日期:

监控到XXXX。2016-01-28 14:55:34
七天前的日期:


[root@i popularity]# cat a.sh
echo `date +%y-%m-%d`    
`:是ESC上面那个点,不是单纯的点。


1. 利用时区,比较笨的办法,不过也可以用.注意改回时区哦.

$#看当前时区
$echo $TZ
CST-8
$#显示当前时间
$date
Mon Apr  2 15:48:36 CST 2002
$#改变当前时区,
TZ=CST+16;export TZ
$#显示当前时间(中间未改变系统时间,但date命令的显示已为昨天)
Mon Apr  1 15:48:33 CST 2002

2.
假如今天是2005-05-17
取2004-09-25
#date -d"-1 year +4 month +8 day" +%Y-%m-%d
取2008-02-12
#date -d"+3 year -3 month -5 day" +%Y-%m-%d
有哥们回复加上:
date +%F --date='1 days ago'

[root@i model]# date +%F --date='1 days ago'
2009-05-06


name=$(date -u +'%Y%m%d')
echo $name;


#!/bin/bash
sql="select FQQ from Tbl_User order by FScoreCount into outfile '/tmp/361sport_2010_order_out_all_$(date  +%Y%m%d).log";  
echo $sql;


[/usr/local/361sport_2010]# sh date.sh
select FQQ from Tbl_User order by FScoreCount into outfile '/tmp/361sport_2010_order_out_all_20100823.log

date -u:直接输出时间
date -u +%Y%m%d

20101203
date -d://时间天数加减
昨天:

date -d"-1 day" +%Y%m%d


(1)年月天数相减:

date -d"+3 year -3 month -5 day" +%Y-%m-%d

2013-08-29

(2)年月日格式2:

date -d"+3 year -3 month -5 day" +%Y%m%d

20130829
什么是胆识?胆识=胆量+见识。If 胆量>见识,then 会因为轻举妄动而导致失败;If 胆量<见识,then 会因为保守固化而贻误战机。只有胆量又大,见识又多时,我们才能冷静而机智地分析问题,并能用平和的心态、宽广的视野和全新的思维方式来解决问题,我们有自已的主见,不会人云亦云,不会手足无措,而是敢于挑战自已,敢于创新,敢于突破。
什么是远离:一是远离客户,二是远离员工。什么是远离?远离就是不再仔细倾听他们的意见。
回忆那个光影交错的武侠江湖,醉生梦死的凄美时光...

忧伤,孤独,爱情,像迷离眩目的花,漫天飞舞在滚滚黄沙中...

★.任何人都可以变得狠毒,只要你尝试过什么叫嫉妒.

★.你知道喝水和喝酒的区别吗?酒越喝越暖,水会越喝越寒.阅读全文
firefox和ie在修改了本机的hosts文件后,必须重起一下ie才起作用,今天看到有人讨论这个问题,问有没有办法可以用命令行清空dns的cache,直接使修改过的hosts文件生效,而不需要重起ff或者ie。
方法很简单

ipconfig /flushdns
相应的还有
ipconfig/displaydns Display the contents of the DNS Resolver Cache.

显示dns cache的内容,包括hosts文件里的信息也会显示出来。
ipconfig这个命令经常用,常用的有:
/all Display full configuration information.
/release Release the IP address for the specified adapter.
/renew Renew the IP address for the specified adapter.

但是这个关于dns的功能很少用。还有
/registerdns Refreshes all DHCP leases and re-registers DNS names
/showclassid Displays all the dhcp class IDs allowed for adapter.
/setclassid Modifies the dhcp class id
在新的centos6.2里是这样来安这个setup的。

在command terminal输入:

#netconfig



[code][root@vm02 ~]# netconfig
netconfig: Command not found.
[/code]检查你是root?你装了netconfig的rpm包了吗?find / -name netconfig  -print找一下有没有!
当我登陆到 CentOS 5.3 中,尝试使用netconfig 是不能使用的,并不奇怪。。。
以前版本:
rpm -ivh netconfig-0.8.24-1.2.2.1.i386.rpm
在CentOs5.3没有找到。
也可以直接:
vi /etc/sysconfig/network-script/ifcfg-eth0
一 ,修改:
/etc/sysconfig/network-scripts/ifcfg-eth0


DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static dhcp
IPADDR=192.168.1.101

NETMASK=255.255.255.0

GATEWAY=192.168.1.254


二修改网关

vi /etc/sysconfig/networkNETWORKING=yes
HOSTNAME=Aaron
GATEWAY=192.168.1.254


三修改DNS

vi /etc/resolv.confnameserver 202.96.128.68
nameserver 219.136.241.206



四重新启动网络配置

/etc/init.d/network restart
service network stop
service network start


改主机名
vi /etc/sysconfig/network

但是我是一个懒人的嘛: 其次就使用 setup 来配置,觉得有点惊奇,因为5.1版本可以使用的命令,现在不能

setup-2.5.58-4.el5.noarch.rpm
rpm -ihv  setup-2.5.58-4.el5.noarch.rpm


rpm -ql  setup-2.5.58-4.el5.noarch.rpm
可能是setup没有添加到环境变量的原因,连setup都没有用上,太他妈的倒霉了饿:
最后,

使用了。只好使用 system-config-network!

注意:netconfig是RHEL4 CentOS4里的命令了, RHEL5和CentOS5用setup了,界面跟以前几乎一样。

# rpm -q -a

或者:
rpm -qa |grep man

rpm -qa |grep netconfig



看有没有man、netconfig的包文件?
没有就要安装


-q name :查询
-qa查询所有已安装的RPM
-qi name 查询这个软件详细信息
-ql 显示列表
-qf path  :查询一个文件属于哪个包
-qp 包名 :查文件是什么
-qpl 包名 :针对一个没装过的包


没有的话安装相应的RPM包吧?

你如果用的是:as5不完全安装时没有这个命令的
直接用setup!
选择:network configuration 即可配置!
其实你也可以修改:

/etc/sysconfig/network-scripts/ifcfg-eth0

进行配置!
Centos6,Rpm安装,不知道是不是这个,但安了才能使用setup:
rpm -ihv ./Packages/setuptool-1.19.9-3.el6.i686.rpm
rpm -ihv ./Packages/usermode-1.102-3.el6.i686.rpm  
我们需要对这个数组先按照score【分数排序:由高到低】,然后再由name[姓名低到高排序]:
特别注意:array_multisort对姓名排序时候要utf8【假如是UTF8】转为gbk,否则排序出现错误,切忌切忌!!!
1.排序代码:[特别注意:我在排序分数的时候有个千分位输出,最后排序发现它会当成整形去处理,逗号{千分位分隔符}会截断],所以,最好是先排好【对score排好--》在通过number_format来千分位输出,见下代码:】
由于调用用户姓名接口是utf8输出,我们这儿的php文件是gbk编码【由于大部规定:除了html模板,接口返回编码和数据存储为utf8外其余都是gbk编码,因此:我这个modle层的编码也是gbk的】,为此,必须转为gbk来进行中文名的二次排序【首先是按照分数来排序,这个数组在后面给出】,
注意:转为GBK编码片段: iconv("UTF-8","GBK",$v);
foreach($resultname as $k =>$v)
      {
              $arraydisplay[$i][name] = iconv("UTF-8","GBK",$v);
              $arraydisplay[$i][uid] = $k;
          $arraydisplay[$i][score] =  $json2array[$k];
          $arraydisplay[$i][potourl] = $resulticon[$k];
          foreach ($level_type as $kka =>$vvc)
          {
            if(($json2array[$k]<=$vvc[1])&&($json2array[$k]>=$vvc[0]))
            {
              $imgurl = $LeavelImg[$kka][0];//取得图片地址  
              $loopimg = $LeavelImg[$kka][1];
              for($jj=0;$jj<$loopimg;$jj++)
              {              
                $imgnum[] = $imgurl;
              }
              break;    
            }
          }
          $arraydisplay[$i][imgsrc] = $imgnum;
          unset($imgnum);
            
              $i++;
      }



排序代码:
      $arraydisplay = array_chunk($arraydisplay,10,TRUE);//截取前10个人的数据给smarty          $data = $arraydisplay[0];
      unset($arraydisplay);  
      unset($arraydisplay);  
      foreach ($data as $key => $row)
      {  
                      $score[$key]  = $row['score'];
                      $name[$key] = $row['name'];
      
      }  
      array_multisort($score, SORT_DESC,  $name, SORT_ASC, $data);
      for($iii=0;$iii<10;$iii++)
      {
        $data[$iii]['name'] = iconv("GBK","UTF-8",$data[$iii]['name']);  
        $data[$iii]['score'] =  number_format($data[$iii]['score']);
      }
      $result = $data;
    }






Array
(
    [0] => Array
        (
            [name] => 盛大师
            [uid] => 1159375663
            [score] => 88,897,776
            [potourl] => http://p8.sinaimg.cn/1159375663/50/1236592606
            [imgsrc] => Array
                (
                    [0] => renyuan_level_1.gif
                    [1] => renyuan_level_1.gif
                    [2] => renyuan_level_1.gif
                    [3] => renyuan_level_1.gif
                    [4] => renyuan_level_1.gif
                    [5] => renyuan_level_1.gif
                )

        )

    [1] => Array
        (
            [name] => 你好
            [uid] => 1377417885
            [score] => 728,888
            [potourl] => http://p6.sinaimg.cn/1377417885/50/1234321817
            [imgsrc] => Array
                (
                    [0] => renyuan_level_1.gif
                    [1] => renyuan_level_1.gif
                    [2] => renyuan_level_1.gif
                    [3] => renyuan_level_1.gif
                )

        )

    [2] => Array
        (
            [name] => 笨蛋
            [uid] => 1584778420
            [score] => 77,909
            [potourl] => http://p5.sinaimg.cn/1584778420/50/
            [imgsrc] => Array
                (
                    [0] => renyuan_level_2.gif
                    [1] => renyuan_level_2.gif
                    [2] => renyuan_level_2.gif
                    [3] => renyuan_level_2.gif
                    [4] => renyuan_level_2.gif
                )

        )

    [3] => Array
        (
            [name] => 吥喜欢
            [uid] => 1581862283
            [score] => 17,776
            [potourl] => http://p4.sinaimg.cn/1581862283/50/1239087886
            [imgsrc] => Array
                (
                    [0] => renyuan_level_3.gif
                    [1] => renyuan_level_3.gif
                    [2] => renyuan_level_3.gif
                    [3] => renyuan_level_3.gif
                    [4] => renyuan_level_3.gif
                    [5] => renyuan_level_3.gif
                )

        )

    [4] => Array
        (
            [name] => 阿里爸
            [uid] => 1582003980
            [score] => 17,776
            [potourl] => http://p5.sinaimg.cn/1582003980/50/1232551415
            [imgsrc] => Array
                (
                    [0] => renyuan_level_3.gif
                    [1] => renyuan_level_3.gif
                    [2] => renyuan_level_3.gif
                    [3] => renyuan_level_3.gif
                    [4] => renyuan_level_3.gif
                    [5] => renyuan_level_3.gif
                )

        )

    [5] => Array
        (
            [name] => 科比
            [uid] => 1582157323
            [score] => 17,776
            [potourl] => http://p4.sinaimg.cn/1582157323/50/1232615329
            [imgsrc] => Array
                (
                    [0] => renyuan_level_3.gif
                    [1] => renyuan_level_3.gif
                    [2] => renyuan_level_3.gif
                    [3] => renyuan_level_3.gif
                    [4] => renyuan_level_3.gif
                    [5] => renyuan_level_3.gif
                )

        )

    [6] => Array
        (
            [name] => 琳琳琳
            [uid] => 1281167662
            [score] => 17,776
            [potourl] => http://p7.sinaimg.cn/1281167662/50/1239361854
            [imgsrc] => Array
                (
                    [0] => renyuan_level_3.gif
                    [1] => renyuan_level_3.gif
                    [2] => renyuan_level_3.gif
                    [3] => renyuan_level_3.gif
                    [4] => renyuan_level_3.gif
                    [5] => renyuan_level_3.gif
                )

        )

    [7] => Array
        (
            [name] => 克里斯大王
            [uid] => 1141457724
            [score] => 8,988
            [potourl] => http://p5.sinaimg.cn/1141457724/50/1232521326
            [imgsrc] => Array
                (
                    [0] => renyuan_level_3.gif
                    [1] => renyuan_level_3.gif
                    [2] => renyuan_level_3.gif
                    [3] => renyuan_level_3.gif
                    [4] => renyuan_level_3.gif
                )

        )

    [8] => Array
        (
            [name] => 苗艳宏
            [uid] => 1581837512
            [score] => 8,988
            [potourl] => http://p1.sinaimg.cn/1581837512/50/1236940821
            [imgsrc] => Array
                (
                    [0] => renyuan_level_3.gif
                    [1] => renyuan_level_3.gif
                    [2] => renyuan_level_3.gif
                    [3] => renyuan_level_3.gif
                    [4] => renyuan_level_3.gif
                )

        )

    [9] => Array
        (
            [name] => 朱阿里
            [uid] => 1180166542
            [score] => 8,988
            [potourl] => http://p7.sinaimg.cn/1180166542/50/
            [imgsrc] => Array
                (
                    [0] => renyuan_level_3.gif
                    [1] => renyuan_level_3.gif
                    [2] => renyuan_level_3.gif
                    [3] => renyuan_level_3.gif
                    [4] => renyuan_level_3.gif
                )

        )

)

          



对二维数组里的某列键值进行排序有点相当于sql语句,array_multisort() 可以用来一次对多个数组进行排序,或者根据某一维或多维对多维数组进行排序。 关联(string)键名保持不变,但数字键名会被重新索引。 :
参考自己http://www.jb51.net/article/25882.htm


输出如下所示:
---------- 调试PHP ----------

Array
(
    [0] => Array
        (
            [id] => 6
            [value] => 6-1
            [parent] => 3
        )

    [1] => Array
        (
            [id] => 5
            [value] => 5-1
            [parent] => 2
        )

    [2] => Array
        (
            [id] => 4
            [value] => 4-1
            [parent] => 2
        )

    [3] => Array
        (
            [id] => 3
            [value] => 3-1
            [parent] => 1
        )

    [4] => Array
        (
            [id] => 2
            [value] => 2-1
            [parent] => 1
        )

    [5] => Array
        (
            [id] => 1
            [value] => 1-1
            [parent] => 1
        )

)

输出完成 (耗时 0 秒) - 正常终止

分页: 249/339 第一页 上页 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 下页 最后页 [ 显示模式: 摘要 | 列表 ]