生环学院网站问题

来源:互联网 发布:北京上班族 知乎 编辑:程序博客网 时间:2024/05/01 23:02

1.IIS将附件当作文件浏览问题

今天把下载页面打开,并且点击下载文件,发现可以下载文件了,所以上次下载不成功推测是因为IIS的缓存问题

2.每篇文章可以更改发布的时间

文章模板 位于 \htdocs\cles\templets\default\detail_sh.htm
a. 让时间显示到天即可

{dede:field.pubdate function="MyDate('Y-m-d H:i',@me)"/}改为{dede:field.pubdate function="MyDate('Y-m-d',@me)"/}

b.打开添加、编辑文章的模板 \htdocs\cles\xxxx\templets\article_add.htm 和 article_edit.htm
c.因为dedecms的后台本身就是支持修改发布时间的,所以把html的注释代码去掉即可

3.上传附件大小的限制

打开网站目录下

dede/templets/album_edit.htm    //line.78dede/templets/album_add.htm     //line.70

将默认的大小2MB 修改成为你想要的数字

* 这是在网上搜索到的答案,看似这些更改是和上传有关的,可是在我这边的服务器上面并不起作用*

笔者的服务器架构是IIS+PHP+MySQL
于是我试了一下几种操作的组合:

1.修改album_edit.htm、album_add.htm -> iisreset(重启iis服务),发现没有什么软用2.album_edit.htm、album_add.htm保持不动 -> 修改php.ini -> iisreset,这个是起作用的

总结:在dedecms中修改php.ini文件来改变上传文件的大小

后记:关于upload_max_filesizepost_max_size 的区别
upload_max_filesize is the limit of any single file. post_max_size is the limit of the entire body of the request, which could include multiple files.
upload_max_filesize 是单个文件的大小
post_max_size 是表单数据提交的总大小,而上传一般都是通过post请求的,一次post可能会包含好几个文件的上传,比如这样
post中有5个uploa

4.更改首页标题的长度

只需在代码中加入 titlelen属性即可

{dede:arclist row='6' orderby='pubdate' typeid='46'}    [field:title/]{/dede:arclist}
{dede:arclist row='6' orderby='pubdate' typeid='46' titlelen='70'}    [field:title/]{/dede:arclist}
0 0
原创粉丝点击