上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 40 下一页

yii引入js文件

摘要: 作者:zccst四、在视图层(../views/..)添加CSS文件或JavaScript文件Php代码Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl."/js/TableView.js");Yii::app()->c... 阅读全文
posted @ 2015-03-27 10:24 liuwenbohhh 阅读(996) 评论(0) 推荐(0)

yii url

摘要: 1. 获取url中的host信息:Yii::app()->request->getHostInfo()2. 获取url中的路径信息(不包含host和参数):Yii::app()->request->getPathInfo()3. 获取不包含host信息的url(含参数):Yii::app()->re... 阅读全文
posted @ 2015-03-27 10:23 liuwenbohhh 阅读(182) 评论(0) 推荐(0)

php的string编码类型

摘要: 在php中字符编码转换我们一般会用到iconv与mb_convert_encoding进行操作,但是mb_convert_encoding在转换性能上比iconv要差很多哦。string iconv ( string in_charset, string out_charset, string st... 阅读全文
posted @ 2015-03-27 09:06 liuwenbohhh 阅读(521) 评论(0) 推荐(0)

js返回16位随机数

摘要: public string GetDataRandom() { string strData=DateTime.Now.ToString(); strData=strData.Replace(":",""); strData=strData.Replace("-",""); strData=str... 阅读全文
posted @ 2015-03-26 16:01 liuwenbohhh 阅读(1047) 评论(0) 推荐(0)

php获得本机ipv4地址

摘要: if (isset($_ENV["HOSTNAME"])) $MachineName = $_ENV["HOSTNAME"]; else if (isset($_ENV["COMPUTERNAME"])) $MachineName = $_ENV["COMPUTERNA... 阅读全文
posted @ 2015-03-26 15:55 liuwenbohhh 阅读(491) 评论(0) 推荐(0)

yii widget使用的3个用法

摘要: yii视图中使用的widget方式总结:常用的有3种方式:一、显示详细信息:Java代码$this->widget('zii.widgets.CDetailView',array('data'=>$model,'attributes'=>array('id','title','content',),... 阅读全文
posted @ 2015-03-26 11:19 liuwenbohhh 阅读(1709) 评论(0) 推荐(0)

centos安装lamp步骤还可以

摘要: 1.用yum安装Apache,Mysql,PHP.1.1安装Apacheyum install httpd httpd-devel安装完成后,用/etc/init.d/httpd start启动apache设为开机启动:chkconfig httpd on1.2安装mysql1.2.1 yum in... 阅读全文
posted @ 2015-03-26 10:57 liuwenbohhh 阅读(151) 评论(0) 推荐(0)

高性能的数据库表设计原则

摘要: 1 更小通常更好 选择表示数据的最小类型(正确存储你的内容):比如说,能够使用char 数据类型存储,就不必选择text,能够使用int型存储数据,就不应该使用long型。 理由:更小的数据类型使用了更小的磁盘空间,内存和cpu缓存,而且需要的cpu周期也更少。 PS:确保不会低估要存储的值。(能够... 阅读全文
posted @ 2015-03-26 10:43 liuwenbohhh 阅读(275) 评论(0) 推荐(0)

yii 面包屑

摘要: Yii的Breadcrumbs 是Yii的路径插件,使用方法:widget('zii.widgets.CBreadcrumbs',array('links'=>$this->breadcrumbs,));?>在视图里设置路径信息(在生成Yii 程序里,都会自动产生这些代码,注册掉的部分是自动生成的)... 阅读全文
posted @ 2015-03-25 18:06 liuwenbohhh 阅读(139) 评论(0) 推荐(0)

php == ===

摘要: 区别:===是恒等计算符 同时检查表达式的值与类型==是比较运算符号 不会检查条件式的表达式的类型举例if (strstr($new_url,'http://') === false) {}//NULL,FALSE,array(),"",0,"0"这几个值如果用==他们是相等的,判断出某个值真正的... 阅读全文
posted @ 2015-03-25 09:44 liuwenbohhh 阅读(150) 评论(0) 推荐(0)
上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 40 下一页