OnlyPHP

2013年7月2日

PHP 做群发短信(短信接口连接问题)

摘要: function sendSMS($http,$username,$password,$sendmobile,$send_content){$httpurl = $http;$data = array('USERNAME'=>$username,//用户账号'PASSWORD'=>$password,//用户密码'MOBILE'=>$sendmobile,//号码'CONTENT'=>mb_convert_encoding($send_content,'GB2312','UTF-8& 阅读全文

posted @ 2013-07-02 08:45 OnlyPHP 阅读(579) 评论(0) 推荐(0) 编辑

2013年6月23日

Yii dropDownList 下拉菜单 联动菜单

摘要: 2011-05-26 09:38Yii dropDownList 下拉菜单 联动菜单'USA',7=>'France',3=>'Japan'),array( 'ajax' => array( 'type'=>'POST', //request type 'url'=>Yii::app()->createUrl('project/dynamiccities'), 'update'=>'#city_id&# 阅读全文

posted @ 2013-06-23 01:52 OnlyPHP 阅读(802) 评论(0) 推荐(0) 编辑

2013年6月9日

YIi gridview 自定义按按钮

摘要: Yii框架zii.widgets.grid自定义按钮,ajax触发事件并提示博客分类:PHP我们在用表格展示数据并管理的时候,可能会需要用到按钮来操作某一行数据,比如查看,修改,删除!Yii内置了3种按钮:查看,修改和删除,你可以自定义样式、事件。详细配置见类参考:CButtonColumn.如果需要自定义按钮绑定指定的事件该怎么办呢?幸运的是Yii提供了自定义按钮的办法.看代码:在视图文件里面:Php代码 $this->widget('zii.widgets.grid.CGridView',array( 'id'=>'xx-xx-grid& 阅读全文

posted @ 2013-06-09 00:29 OnlyPHP 阅读(1380) 评论(0) 推荐(0) 编辑

2013年6月7日

psql bat 定时任务

摘要: 原理:使用"C:\Program Files\PostgreSQL\9.0\bin\psql.exe"来建立到PostgreSQL数据库的连接后执行SQL语句。(建立数据库连接的方法,可以参考C:\Program Files\PostgreSQL\9.0\scripts\runpsql.bat文件。)一,执行SQL语句SET DB_NAME=TEMP"C:\Program Files\PostgreSQL\9.0\bin\psql.exe" -h localhost -U postgres -d �_NAME% -p 5432 -w -c "S 阅读全文

posted @ 2013-06-07 13:42 OnlyPHP 阅读(831) 评论(0) 推荐(0) 编辑

2013年6月5日

PostgreSQL: function 返回结果集多列和单列的例子

摘要: PostgreSQL: function 返回结果集多列和单列的例子2012-06-23 13:10:21|分类: Postgres基础 |标签: |字号大中小订阅 今天有人问到在 PostgreSQL 函数中如何返回结果集的单列,返回结果集(多列)的方法很多,那么如何返回结果集的单列呢,做了下测试,具体步骤如下:一 测试一:返回多条记录(单列)--1 创建测试表并插入记录skytf=> create table test_result1 (id integer,name varchar(32));CREATE TABLEskytf=> create table test_resu 阅读全文

posted @ 2013-06-05 12:32 OnlyPHP 阅读(2407) 评论(0) 推荐(0) 编辑

PostgreSQL quote ident and literal

摘要: PostgreSQL SQL Injection Attack MitigationOPENSSL 转载 - 1PostgreSQL quote ident and literal2013-05-21 16:08:58|分类: PgSQL Develop |标签: |字号大中小订阅前面一篇介绍了SQL注入, 其中利用字符逃逸漏洞的占了主要部分.PostgreSQL 提供了几个函数用来输出转义后的字符串.quote_ident(stringtext)textReturn the given string suitably quoted to be used as an identifier in 阅读全文

posted @ 2013-06-05 12:29 OnlyPHP 阅读(1792) 评论(0) 推荐(0) 编辑

2013年5月30日

Yii GridView export excel

摘要: publicfunction actionAdmin(){ $model =newEmployee('search'); $model->unsetAttributes(); // clear any default values if(isset($_GET['Employee'])) { $model->attributes = $_GET['Employee']; // save search parameters to the session data Yii::app()->user->setState(' 阅读全文

posted @ 2013-05-30 20:40 OnlyPHP 阅读(405) 评论(0) 推荐(0) 编辑

2013年5月23日

postgresql 触发器的使用

摘要: 39.9. Trigger ProceduresPL/pgSQL can be used to define trigger procedures. A trigger procedure is created with the CREATE FUNCTION command, declaring it as a function with no arguments and a return type of trigger. Note that the function must be declared with no arguments even if it expects to recei 阅读全文

posted @ 2013-05-23 09:56 OnlyPHP 阅读(216) 评论(0) 推荐(0) 编辑

postgresql 存储过程使用

摘要: Return more than one row of data from PL/pgSQL functionsFrom PostgreSQL wikiJump to: navigation, searchby Stephan SzaboLast updated 4th April 2003 PostgreSQL 7.3 now supports a much more flexible system for writing set returning functions (SRFs) that when combined with some of the new function permi 阅读全文

posted @ 2013-05-23 09:53 OnlyPHP 阅读(579) 评论(0) 推荐(0) 编辑

2013年5月21日

yii 多文件上传下载

摘要: CUploadedFile实现多文件上传方法:view视图代码: for($i=0;$i<3;$i++){ //echo $form->fileField($model,'xiangguan_tupian[]').'<br/>';//这种方法不行 //echo CHtml::activeFileField($model,'xiangguan_tupian[]');//这种也不行 //echo CHtml::fileField('xiangguan_tupian[]','',array( 阅读全文

posted @ 2013-05-21 16:03 OnlyPHP 阅读(586) 评论(0) 推荐(0) 编辑

导航