摘要:
转载自:http://hi.baidu.com/firstcaohui/blog/item/905ff40069d5a305738b6568.html<?php/*【插入排序(一维数组)】【基本思想】:每次将一个待排序的数据元素,插入到前面已经排好序的数列中的适当位置,使数列依然有序;直到待排序数据元素全部插入完为止。【示例】:[初始关键字] [49] 38 65 97 76 13 27 49J=2(38) [38 49] 65 97 76 13 27 49J=3(65) [38 49 65] 97 76 13 27 49J=4(97) [38 49 65 97] 76 13 27 49 阅读全文
posted @ 2011-07-27 18:18
DavidYanXW
阅读(241)
评论(0)
推荐(0)
摘要:
转载自:http://hi.baidu.com/32641469/blog/item/073f43fec48ec5235d6008ec.html有关文件上传,Yii提供了一个很重要的类 CUploadedFile在控制器里写一个图像上传的动作 public function actionUploadPhoto() { $model=$this->loadModel(); if(isset(Yii::app()->user->id)) { if(isset($_POST['UserProfile'])) { $model->attributes=$_POS 阅读全文
posted @ 2011-07-27 04:19
DavidYanXW
阅读(383)
评论(0)
推荐(0)
摘要:
转载自:http://hi.baidu.com/done_gone/blog/item/6e1ffc0d6ff23795d1581bf4.html这里不显示,model和view的代码,或者明天补上。控制器代码:$model=new Albums;if(isset($_POST['Albums'])){$model->attributes = $_POST['Albums'];$model->album_image = CUploadedFile::getInstance($model,'album_image');//album_i 阅读全文
posted @ 2011-07-27 04:18
DavidYanXW
阅读(1037)
评论(0)
推荐(0)
摘要:
转载自:http://hi.baidu.com/wastorode/blog/item/70c5cfbb6644861d18d81f19.htmlyii框架提供了activeFileField控件来完成上传文件(当然也包括了上传图片)的操作,下面介绍yii的activeFileField使用方法。1、函数原型:public static stringactiveFileField(CModel$model, string $attribute, array $htmlOptions=array ( ))2、调用例子:(1)首先,设置form,这一步一 定要做,把form设置为’multipar 阅读全文
posted @ 2011-07-27 04:17
DavidYanXW
阅读(723)
评论(0)
推荐(0)
摘要:
转载自:http://hi.baidu.com/wastorode/blog/item/4a59b44128487b31cefca3ff.htmlFirst declare an attribute to store the file name in the model class (either a form model or an active record model). Also declare a file validation rule for this attribute to ensure a file is uploaded with specific extension n 阅读全文
posted @ 2011-07-27 04:16
DavidYanXW
阅读(644)
评论(0)
推荐(0)
摘要:
转载自:http://www.cnblogs.com/ainiaa/archive/2010/07/25/1784564.html一直在做php的开发工作.在开发的过程中老早就听说了“伪静态”这一说。但是一直没有对其进行了解。今天终于下定决定 要好好的了解下这方面的内容。首先,什么是伪静态:伪静态又名URL重写,是动态的网址看起来像静态的网址。换句话说就是,动态网页通过重写URL方法实现去掉动态网页的参数,但在实际的网页目录中并没有必要实现存在重写的页面。另外在补充两个名词解析静态网址:纯静态HTML文档,能使用filetype:htm查询到的网页动态网址:内容存于数据库中,根据要求显示内容, 阅读全文
posted @ 2011-07-27 04:13
DavidYanXW
阅读(218)
评论(0)
推荐(0)
摘要:
转载自:http://blog.csdn.net/t240034137/article/details/4281782原作者拥有所有版权, 本人负责传播!在心底深深的说一句:GOOD BYE! 阅读全文
posted @ 2011-07-27 01:45
DavidYanXW
阅读(341)
评论(0)
推荐(0)
浙公网安备 33010602011771号