php用户名密码

http://112.124.47.59:8090/activity/index/free?mobile=15652701923&tcode=f9380859085200714&s=7c28e139fc1fda312be5c9f6e167ae4e&check=1b18eef24af3304ee9bb40f6a8a21685

显示某一列出现过N次的值

1
2
3
4
SELECT id
FROM tbl
GROUP BY id
HAVING COUNT(*) = N;

 

http://coolshell.cn/

shell

root@ldm-Barebone-name:/usr/local# ps -aux | grep php
root@ldm-Barebone-name:/usr/local# crontab -e           3                   

 

写计划任务  

root@ldm-Barebone-name:/usr/local#

                 #* * * * * /usr/local/test.sh

 

 

执行
root@ldm-Barebone-name:/usr/local# ./test.sh
停止计划任务
ctrl +z    

中断

ctrl + c

显示所有的计划任务

root@ldm-Barebone-name:/usr/local# crontab -l    显示所有的计划任务

 

 

 

写shell  脚本

1  进入目录

root@ldm-Barebone-name:/usr/local#

2 vim test.sh
#!/bin/bash     
cd /var/www/testnew/protected/
./yiic test ADD

 

批量删除svn文件

终于找到方,在终端中输入:

find . -name .svn -type d -exec rm -fr {} \;

root@ldm-Barebone-name:/var/www/yii# find /var/www/yii/ -name ".svn"

本文来自于东至BLOG,原文地址:http://zhaoyaodong.cn/view/238.html

 

 

 

 

 

 

 

 

 

流量查询限制

http://192.168.1.1/userLogin.asp

http://www.songxuemei.com

 http://so.fanqiang.info

 position:fixed? 

ibus-daemon -drx

punica-unifi-2012

 

【SVN 】

https://192.168.1.12/punica/web/tuzi-api

https://192.168.1.12/punica/web/tuziv

 

http://www.7po.com/tt

openx

http://dev-openx.tuziv.tv    

ssh上传 合并主

ssh lidongming @192.168.1.16

【ad】

rsync_xc  ad upload

【cp】

rsync_xc  cp upload

dev-cp.tuziv.com

workbeanch

lidongming1124@126.com

Ll100000

【put】

rsync_xc  16009 upload

【stats】

rsync_xc  statsnew upload

 dev-tongji.tuziv.tv

https://mail.luxtonenet.com/

 

 

 

 

tongbugXH1842

 $url=Yii::getPathOfAlias('webroot').'/css/bg.gif';

 sudo /var/www/yii/framework/yiic webapp ../testapi

 

x新闻

 

uc_wai

118.145.20.220

puti_wai

118.145.20.220

安装SVN Client

1.开启Aptana,打开help菜单,点击“Install New Software”

2.点击Add按钮,在Add Site窗口,name输入:SVN ,location输入:http://subclipse.tigris.org/update_1.6.x,点击ok按钮

3.全选除了 “Subclipse Integration for Mylyn 3.x (Optional)3.0.0“ 和 ” Subversion Revision Graph1.0.9“之外的所有项

4.一路Next,finish后重启Aptana

使用SVN Client

1.装好SVN后从菜单: window>show view>other 找到【SVN资源库】面板

2.在资源库面板右击,新建一个【资源库位置】输入svn地址

3.在建好的SVN资源位置上右击 选择【检出为...】

4.在【从SVN检出】面板配置相关设置,将在Aptana中新建一个使用该SVN地址的Project

5.在你的项目目录或文件上右击【Team】菜单,就可以操作SVN文件了

     public function actionSubmitapi()
    {
        if($_REQUEST['wang']=='nei'){
            $url='http://192.168.1.16:16009/api';
        }elseif($_REQUEST['wang']=='wai'){
            $url='https://gw.16tree.com/api';
        }
        

        $proxy='';
    
        $params = $_REQUEST;
        $user_agent ="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)";
        $ch = curl_init();  
        if(!empty($proxy)){
            curl_setopt ($ch, CURLOPT_PROXY, $proxy);
        }
        curl_setopt($ch, CURLOPT_URL, $url);
        
        curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
        //curl_setopt($ch, CURLOPT_PORT, 80);
        curl_setopt($ch, CURLOPT_TIMEOUT, 50);
        curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);
    
        //SSL
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
        curl_setopt($ch,CURLOPT_HTTPHEADER,array(
            'Accept-Language: zh-cn',
            'Connection: Keep-Alive',
            'Cache-Control: no-cache'
        ));
        $document = curl_exec($ch);
           echo $document;
    
        $info=curl_getinfo($ch);
            if($info['http_code']=="200"){
    
                    $result = true;
        }else{
    
            $result = false;
        }
        curl_close($ch);
        return $result;

    }

shishuai@luxtone.com
shishuai

php函数array_filter()过滤php空数组 php去掉空数组 sort()数组键名重置序列化 by cubeking

<?php
$b=array('aa','','bb','cc','','ddd');
$c=array_filter($b);
var_dump($c);
array(4) { [0]=> string(2) "aa" [2]=> string(2) "bb" [3]=> string(2) "cc" [5]=> string(3) "ddd" }

   protected function setAccessToken($oauth_token, $client_id, $expires, $scope = NULL) {
        //缓存中保存一份
        $values = array(
            'oauth_token'=>$oauth_token,
            'client_id'=>$client_id,
            'expire'=>$expires,
            'scope'=>$scope,
            'uid'=>Yii::app()->session->get("uid")
        );
        RedisHandler::kv_set_expire($oauth_token, $values, Yii::app()->params['cache']['expire']);
        
        //数据库中也保存一份
        try
        {
          $sql = "INSERT INTO {{token}} (oauth_token, client_id, expires, scope,uid) VALUES (:oauth_token, :client_id, :expires, :scope,:uid)";
          $stmt = $this->db->createCommand($sql);
          $stmt->bindParam(":oauth_token", $oauth_token, PDO::PARAM_STR);
          $stmt->bindParam(":client_id", $client_id, PDO::PARAM_STR);
          $stmt->bindParam(":expires", $expires, PDO::PARAM_INT);
          $stmt->bindParam(":scope", $scope, PDO::PARAM_STR);
          $stmt->bindParam(":uid",Yii::app()->session->get("uid"),PDO::PARAM_INT);
          $stmt->execute();
        } catch (PDOException $e) {
          $this->handleException($e);
        }
  }

11111php traversable

实现此接口的内建类可以使用 foreach 进行遍历而无需实现 IteratorAggregateIterator 接口。

posted @ 2018-01-19 16:21  jason&li  阅读(1295)  评论(0编辑  收藏  举报