分类 技术宅的演示性文稿 下的文章

这几天在用织梦给别人做一个站,整个站都做好了,不过遇到了一点问题,就是不知道织梦在登陆成功或者发布文章成功以后有一个跳转页,这个东西在哪里改。

这个东西很烦,上面都会有dedecms提示信息的字样。经过别人的提示,在include/common.func.php这个文件当中终于找到了改这个字的地方……

DEDE还真实坑爹呢,把这个东西写到PHP里面,害我在模版页找了半天没找到……

先说一个坑爹的事情!!用织梦做网站的,相信对

{dede:pagelist listitem="info,index,end,pre,next,pageno,option" listsize="5"/}这个标签并不陌生吧!

这个是织梦做分页列表的标签!

我不知道你们遇没遇到过分页标签无法通过CSS来控制的情况!反正我遇到了!不管怎么排,删除CSS也好,直接不用那个dede_page的CSS也好!反正就是竖着的!后来我找了下相关资料。OK~解决这个问题了!

首先,大家先打开include下的arc.listview.class.php文件

找到function GetPageListDM($list_len,$listitem="index,end,pre,next,pageno")这里要说明一下,我用的是动态的文档,所以就找到这个就行,如果是生成的静态页,请查找function GetPageListST($list_len,$listitem="index,end,pre,next,pageno")

好了!现在我们开始改造吧!!!!

/**
     *  获取动态的分页列表
     *
     * @access    public
     * @param     string  $list_len  列表宽度
     * @param     string  $list_len  列表样式
     * @return    string
     */
    function GetPageListDM($list_len,$listitem="index,end,pre,next,pageno")
    {
        global $cfg_rewrite;
        $prepage = $nextpage = '';
        $prepagenum = $this->PageNo-1;
        $nextpagenum = $this->PageNo+1;
        if($list_len=='' || preg_match("/[^0-9]/", $list_len))
        {
            $list_len=3;
        }
        $totalpage = ceil($this->TotalResult/$this->PageSize);
        if($totalpage<=1 && $this->TotalResult>0)
        {
            return "<ol>共 1 页/".$this->TotalResult." 条记录</ol>\r\n";
        }
        if($this->TotalResult == 0)
        {
            return "<ol>共 0 页/".$this->TotalResult." 条记录</ol>\r\n";
        }
        $maininfo = "<ol>共 <strong>{$totalpage}</strong>页<strong>".$this->TotalResult."</strong>条</ol>\r\n";

        $purl = $this->GetCurUrl();
        // 如果开启为静态,则对规则进行替换
        if($cfg_rewrite == 'Y')
        {
            $nowurls = preg_replace("/\-/", ".php?", $purl);
            $nowurls = explode("?", $nowurls);
            $purl = $nowurls[0];
        }

        $geturl = "tid=".$this->TypeID."&TotalResult=".$this->TotalResult."&";
        $purl .= '?'.$geturl;

        $optionlist = '';
        //$hidenform = "<input type='hidden' name='tid' value='".$this->TypeID."'>\r\n";
        //$hidenform .= "<input type='hidden' name='TotalResult' value='".$this->TotalResult."'>\r\n";

        //获得上一页和下一页的链接
        if($this->PageNo != 1)
        {
            $prepage.="<ol><a href='".$purl."PageNo=$prepagenum'>上一页</a></ol>\r\n";
            $indexpage="<ol><a href='".$purl."PageNo=1'>首页</a></ol>\r\n";
        }
        else
        {
            $indexpage="<ol><a>首页</a></ol>\r\n";
        }
        if($this->PageNo!=$totalpage && $totalpage>1)
        {
            $nextpage.="<ol><a href='".$purl."PageNo=$nextpagenum'>下一页</a></ol>\r\n";
            $endpage="<ol><a href='".$purl."PageNo=$totalpage'>末页</a></ol>\r\n";
        }
        else
        {
            $endpage="<ol><a>末页</a></ol>\r\n";
        }

你会发现这里面所有的是<li>标签显示的!当然,我发的这个是我自己修改过的!我把它修改成OL了!然后全部修改成这个样子!!至于CSS自己重新写吧!好了!就这么简单!!!

mysql导入数据库文件最大限制更改解决方法You probably tried to upload too large file

最近一次在用phpmyadmin导入mysql数据库时,偶的15M的数据库不能导入,mysql数据库最大只能导入2M..

phpmyadmin数据库导入出错:
You probably tried to upload too large file. Please refer to documentation for ways to workaround this limit.

可以修改导入数据库文件最大限制吗?

到网上搜索了一下前人的解决办法,大多数都说修改php.ini中的upload_max_filesize,但修改了这个以后,还是提示这个问题;但phpmyadmin在提示这个问题的时候,右下角有一行英文提示,大致意思是说,解决这个问题,可以参考phpmyadmin文档;直接点击这个链接,phpmyadmin自动查找到了以下说明:

[1.16] I cannot upload big dump files (memory, http or timeout problems).
Starting with version 2.7.0, the imp

ort engine has been re–written and these problems should not occur. If possible, upgrade your phpMyAdmin to the latest version to take advantage of the new import features. The first things to check (or ask your host provider to check) are the values of upload_max_filesize, memory_limit and post_max_size in the php.ini configuration file. All of these three settings limit the maximum size of data that can be submitted and handled by PHP. One user also said that post_max_size and memory_limit need to be larger than upload_max_filesize.

以上文件大致说明的意思就是说,遇到导入过大文件时,

首先检查php.ini 配置文件中的以下三个地方,

upload_max_filesize, memory_limit 和post_max_size,

并且推荐修改的值要稍大于导入的巨大sql数据库文件;依照这个提示,我修改了以上三个在php.ini中的值以后,

重启了php环境,(这个很重要,我原先没重启APACHE 都不行啊 ~呵呵~)

 

再次导入时,虽然phpmyadmin还是显示导入最大限制:20,480 KB,但巨大的80M数据库文件已经被成功的导入了。

 
所用phpMyAdmin的版本为 2.8.1,环境:APMServ 5.1.2

    经常用CSS的人肯定有知道,min-height这个最低高度属性,在大多数浏览器都是识别这个标签的,但是IE6却不识别这个标签。那我们想要一个最低高度怎么办呢?很简单

height:auto!important;  
height:500px;  
min-height:500px;

我们对IE6进行一个hack。由于IE6不识别!important这个属性,那IE6会自动读取下面的height:500这个属性,然后IE6默认的是,如果里面的内容超过DIV的高度的话,那DIV高度是会自动增加的!这样就达到了我们让DIV自动适应高度的要求了!哈哈,怎么样,是不是很简单呢?

嘿嘿,上次小A给我了G+的邀请码,然后我翻墙过去看了一下,由于速度实在太慢,什么也做不了!也就一直放在那没用了!不过最近我找到了一个好的方法,可以不用翻墙直接上g+!哈哈哈,不错吧!好了,闲话不多说,现在让我来教你用这个方法吧!

其实这个方法就是修改一下hosts文件而已!

hosts文件的位置在C:\WINDOWS\system32\drivers\etc这个位置,然后用记事本打开它,通常情况下你会看到

# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
127.0.0.1 localhost

 

这样一堆的信息!那你现在不用管这么多,直接在127.0.0.1 localhost这个下面添加

203.208.46.29 plus.google.com.hk
203.208.46.29 plus.google.com
这样两行上去然后你就可以使用GOOGLE+了!怎么样?来体验一下吧!哈哈!
需要邀请码的,可以在我博客上留言哟!
亲,记得保存哟!

邀请地址https://plus.google.com/i/AxAWMYI-z4s:cgOavB-yWak
可以通过这个地址直接注册!