上一页 1 ··· 4 5 6 7 8 9 10 11 下一页
摘要: public void __construct(integer $status, string $message=NULL, integer $code=0)$statusintegerHTTP状态码,如403,404,500等等。$messagestring错误信息$codeinteger错误代码源码: framework/base/CHttpException.php publicfunction__construct($status,$message=null,$code=0){$this->statusCode=$status;parent::__construct($messa 阅读全文
posted @ 2013-12-24 10:07 jami918 阅读(1355) 评论(0) 推荐(0) 编辑
摘要: 1,main.php 里面导入'import' => array( 'application.components.*' ),2,application/components/BaseComponent.php_url = $value; } public function getUrl() { return $this->_url ; } public function test() { return 'test'; }}4,application/components/Controller.phpclass Controller 阅读全文
posted @ 2013-12-20 14:44 jami918 阅读(684) 评论(0) 推荐(0) 编辑
摘要: art 基本示例显示图片外部页面视频询问广告关闭弹出菜单引自http://blog.csdn.net/weinierbian/article/details/75664591 属性1.11 autoOpen ,这个属性为true的时候dialog被调用的时候自动打开dialog窗口。当属性为false的时候,一开始隐藏窗口,知道.dialog("open")的时候才弹出dialog窗口。默认为:true。1.12 初始化例:请注意,$('.selector')是dialog 的类名,在本例中.selector=#dialoag,以后不再说明。$('. 阅读全文
posted @ 2013-12-19 20:11 jami918 阅读(839) 评论(0) 推荐(0) 编辑
摘要: 让ar执行queryall和queryrow方法返回数组dbActiveGroup(); if(isset(self::$_dbConnections[$activeGroup])) { return self::$_dbConnections[$activeGroup]; } else { $dbConnection = ConnectionHelper::get($activeGroup); if( ! empty($dbConnection) && $dbConnection instanceof CDbConnection) { self::$_dbCo... 阅读全文
posted @ 2013-12-06 17:23 jami918 阅读(1061) 评论(0) 推荐(0) 编辑
摘要: httpd.conf:Include "F:/wamp/alias/*" Options Indexes FollowSymLinks Multiviews AllowOverride All Order Allow,Deny Allow from all DocumentRoot F:\wamp\... 阅读全文
posted @ 2013-12-06 14:03 jami918 阅读(253) 评论(0) 推荐(0) 编辑
摘要: post有3种。1、post方式privatefunction send_post($url,$post_data){ $ch = curl_init($url); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_POST, TRUE); curl_setopt($ch, CURLOPT_POSTFIELDS, ... 阅读全文
posted @ 2013-11-25 11:27 jami918 阅读(352) 评论(0) 推荐(0) 编辑
摘要: main.php://替换所有模板//加载文件名为first的模板// 'theme'=>'theme1', 'components'=>array( //改变主题basepath 'themeManager'=>array( 'basePath' => __DIR__. '/../themes' ),//单个控制器: public function actionIndex(){ Yii::app()->setTheme('theme1'); 阅读全文
posted @ 2013-11-15 14:23 jami918 阅读(193) 评论(0) 推荐(0) 编辑
摘要: <?phpset_time_limit (0);/** $url 图片地址* $filepath 图片保存地址* return 返回下载的图片路径和名称*/function getimg($url, $filepath,$i) { if ($url == '') { return false; } $ext = strrchr($url, '.'); if ($ext != '.gif' && $ext != '.jpg') { return false; } //判断路经是否存在 !is_dir($file 阅读全文
posted @ 2013-10-30 10:46 jami918 阅读(167) 评论(0) 推荐(0) 编辑
摘要: time()在PHP中是得到一个数字,这个数字表示从1970-01-01到现在共走了多少秒,很奇怪吧 不过这样方便计算, 要找出前一天的时间就是time()-60*60*24; 要找出前一年的时间就是time()*60*60*24*365 那么如何把这个数字换成日期格式呢,就要用到date函数了 $t=time(); echodate("Y-m-dH:i:s",$t); 第一个参数的格式分别表示: a-"am"或是"pm" A-"AM"或是"PM" d-几日,二位数字,若不足二位则前面补零;如: 阅读全文
posted @ 2013-08-21 11:31 jami918 阅读(179) 评论(0) 推荐(0) 编辑
摘要: Yii里获取当前controller和action的id 在控制器里$name = $this->getId(); // controller$name = $action->id; // action在视图里$name = $this->id = Yii::app()->controller->id; // controller$name = $this->action->id = $this->getAction()->getId(); // action 阅读全文
posted @ 2013-07-29 11:02 jami918 阅读(875) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 下一页