上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 15 下一页
摘要: C#利用反射,遍历获得一个类的所有属性名,以及该类的实例的所有属性的值 总结:对应某个类的实例化的对象tc, 遍历获取所有属性(子成员)的方法(采用反射): Type t = tc.GetType();//获得该类的Type //再用Type.GetProperties获得PropertyInfo[],然后就可以用foreach 遍历了foreach (PropertyInfo pi in t.GetProperties()){ object value1 = pi.GetValue(tc, null));//用pi.GetValue获得值 string name = pi.Name... 阅读全文
posted @ 2011-08-22 14:11 Byrd 阅读(842) 评论(0) 推荐(0) 编辑
摘要: Fckedit字体默认显示格式是按照比例显示的,比如smaller;larger;在文章中显示的时候可能跟自己发布的时候的大小不一样,改成像素设置大小,如下:文件fckconfig.js 中找到FCKConfig.FontSizes = 'smaller;larger;xx-small;x-small;small;medium;large;x-large;xx-large' ;设置成:FCKConfig.FontSizes = '8px/8;9px/9;10px/10;11px/11;12px/12;13px/13;14px/14;15px/15;16px/16;17p 阅读全文
posted @ 2011-08-09 14:01 Byrd 阅读(249) 评论(0) 推荐(0) 编辑
摘要: 如果想显示点击次数,请增加view参数,即把下面JS调用放到文档模板适当位置<script src="{dede:field name='phpurl'/}/count.php?view=yes&aid={dede:field name='id'/}&mid={dede:field name='mid'/}" language="javascript"></script>普通计数器为<script src="{dede:field name=' 阅读全文
posted @ 2011-08-08 16:27 Byrd 阅读(749) 评论(0) 推荐(0) 编辑
摘要: MySQL 获得当前日期时间 函数 1.1 获得当前日期+时间(date + time)函数:now() mysql> select now(); +---------------------+ | now() | +---------------------+ | 2008-08-08 22:20:46 | +---------------------+ 除了 now() 函数能获得当前的日期时间外,MySQL 中还有下面的函数: current_timestamp() ,current_timestamp ,localtime() ,localtime ,localtimestamp 阅读全文
posted @ 2011-08-08 09:45 Byrd 阅读(590) 评论(0) 推荐(0) 编辑
摘要: from_unixtime()是MySQL里的时间函数date为需要处理的参数(该参数是Unix 时间戳),可以是字段名,也可以直接是Unix 时间戳字符串后面的 '%Y%m%d' 主要是将返回值格式化例如:mysql>SELECT FROM_UNIXTIME( 1249488000, '%Y%m%d' ) ->20071120mysql>SELECT FROM_UNIXTIME( 1249488000, '%Y年%m月%d' ) ->2007年11月20UNIX_TIMESTAMP()是与之相对正好相反的时间函数UNIX 阅读全文
posted @ 2011-08-08 09:43 Byrd 阅读(4170) 评论(0) 推荐(0) 编辑
摘要: 说明: 在DedeCMS列表中直接输出文章所含附件的下载链接。 用法: [field:body function="getDownloadUrl(@me)" /] 操作: 需要改动2个文件: 第一个:/include/extend.func.php 第二个:/include/fckeditor/editor/dialog/dede_addon.php 在第一个文件中添加函数: /*** 说明:输出文章内容中的附件地址,参数为文章内容**/function getDownloadUrl($string, $name = '下载附件', $target=&quo 阅读全文
posted @ 2011-08-04 16:55 Byrd 阅读(1118) 评论(0) 推荐(0) 编辑
摘要: DEDECMS(织梦)5.6系统支持文档权重weight排序,可以在模板中使用:{dede:arclist row='10' titlelen='50' orderby='weight'} •[field:textlink/]<br/> {/dede:arclist}其中的orderby='weight'就实现了文档按照权重排序了。这是arclist标签,可以用在任何位置来调用文档列表.然而,在栏目列表页,如果你要使用list标签(实现文档列表分页),也想用权重(weight)排序,{dede:list pagesiz 阅读全文
posted @ 2011-08-04 16:46 Byrd 阅读(305) 评论(0) 推荐(0) 编辑
摘要: 标签dede:arclist的排序是通过orderby来指定的,如下: {dede:arclist orderby='排序字段' } {/dede:arclist} orderby='sortrank' 文档排序方式 § orderby='hot' 或 orderby='click' 表示按点击数排列 § orderby='sortrank' 或 orderby='pubdate' 按出版时间排列 § orderby='near' § orde 阅读全文
posted @ 2011-08-04 16:43 Byrd 阅读(1216) 评论(0) 推荐(0) 编辑
摘要: {dede:global.cfg_memberurl/} 指的是会员中心 对应/member/目录 {dede:global.cfg_cmsurl/} 对应的是网站根目录/ {dede:global.cfg_dataurl/} data目录 对应 /data/ {dede:global.cfg_basehost/} 网站地址 比方:http://www.sina.com {dede:global.cfg_webname/} 网站名称 {dede:global.cfg_soft_lang/} 网页编码 GBK2312 或者 UTF-8 {dede:global.cfg_description/} 阅读全文
posted @ 2011-08-03 10:13 Byrd 阅读(6619) 评论(0) 推荐(1) 编辑
摘要: 出现"若 要针对 .NET Framework 4.0 或更高版本进行编译,则提供程序选项中“compilerVersion”特性的值必须为“v4.0”或更高版本。若要针对 .NET Framework 3.5 或更低版本编译此 Web 应用程序,则请从 Web.config 文件的 <compilation> 元素中移除 targetFramework 特性。"错误,请参照下面代码修改或添加网站的Web.config中configuration——system.codedom配置节:<system.codedom> <compilers> 阅读全文
posted @ 2011-08-01 14:50 Byrd 阅读(5498) 评论(3) 推荐(1) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 15 下一页