看到了一篇介绍如何在Apache下运行.net的文章,在这里转载一下:
首先,必须要有Windows环境和.NET Framework的支持。此外还建议安装.NET开发工具如.NET Framework SDK或者VisualStudio.NET。需要注意的是Windows的版本应为2000、2003和XP。Win9X系列不能安装.NET Framework。然后需要安装Apache。应该使用Win32平台的Apache,版本2.0以上。推荐使用2.0.51版本。下载地址:http://apache.freelamp.com/httpd/binaries/win32/apache_2.0.52-win32-x86-no_ssl.msi具体的安装过程请参阅其他文章,本文不再赘述。

下面要下载并安装Apache环境下的ASP.NET模块。下载地址:http://www.apache.org/dist/httpd/mod_aspdotnet/mod_aspdotnet-2.0.0.msi下载完成后双击打开,一路Next即可安装完成。

为了便于管理,我们在htdocs目录下新建一个active目录,专门存放.aspx文件。现在需要对httpd.conf文件作一定配置,在文件末尾添加:
#asp.net
LoadModule aspdotnet_module “modules/mod_aspdotnet.so”

AddHandler asp.net asax ascx ashx asmx aspx axd config cs csproj \
licx rem resources resx soap vb vbproj vsdisco webinfo


# Mount the ASP.NET example application

AspNetMount /active “D:/Program Files/Apache Group/Apache2/htdocs/active”
# Map all requests for /active to the application files

Alias /active “D:/Program Files/Apache Group/Apache2/htdocs/active”
# Allow asp.net scripts to be executed in the active example

Options FollowSymlinks ExecCGI

Order allow,deny

Allow from all

DirectoryIndex Default.htm Default.aspx


# For all virtual ASP.NET webs, we need the aspnet_client files

# to serve the client-side helper scripts.

AliasMatch /aspnet_client/system_web/(\d )_(\d )_(\d )_(\d )/(.*) \

“C:/Windows/Microsoft.NET/Framework/v$1.$2.$3/ASP.NETClientFiles/$4″

"C:/Windows/Microsoft.NET/Framework/v*/ASP.NETClientFiles">

Options FollowSymlinks

Order allow,deny

Allow from all


其中D:/Program Files/Apache Group/Apache2是Apache的安装目录,应根据实际情况更改。现在可以在active目录下放上ASP.NET探针。重启Apache之后,即可体验Apache下的ASP.NET了。

由于IIS和Apache下的ASP.NET都是运行在Common Language Runtime(CRL)的基础上,因此Apache环境下的ASP.NET程序的运行速度不会比在IIS下慢。

 

今天一同事在操作ecms时候了,出现了不能登录后台,并出现这样的提示错误:

1
2
3
4
5
6
Warning: Cannot modify header information - headers already sent by (output started at E:\wwwroot\com\i.com-163.com\e\class\config.php:1) in E:\wwwroot\com\i.com-163.com\e\class\connect.php on line 149
信息提示

您的Cookie没有开启,不能登录成功

如果您的浏览器没有自动跳转,请点击这里

让我给他解决,我首先查了一些资料,有的说是header()之前有输出造成的,后来看到百度知道上有位仁兄也遇到了这样的问题,有人回答说是config文件用txt文件修改后,编码给整错了,不过那仁兄说这个不能解决他的问题,但是我问了同事是不是用txt修改过config文件,他很从容的回答,是的。于是修改e/class下的config文件编码后,一个令人厌恶的问题解决了。

 

如果有一天,你离开了
我不知道如何生活下去。
如果有一天,我离开了
你该如何走完这段人生。
如果有一天,我失败了
不知道我还能怎么生活。
如果有一天,我成功了
不知道还该做些什么。
如果有一天,我想家了
不知道该如何做出决定。
如果有一天,想放弃了
我的人生该如何继续。
如果有一天,举步维艰了
我的性格该如何改变。
这一切都是欲望所至
如果没有这样的欲望,我相信你会一直和我在一起。
如果没有这样的杂念,我想我一辈子也不会离开你。
如果不想太多的得到,失败与成功对我也都无所谓。
如果没有这样的奢望,我想天天都能看到我的父母。
如果没有欲望的驱使,放弃对我的人生也没有影响。
如果发展举步维艰了,想想什么是该放弃和改变的。
小时候只想环游世界和做出对人类的有伟大贡献的事情;
现在只想生活如何过得更好和获得更高的社会地位。
欲望是驱使我们前进的动力,改变我们的道具。
对与错没有绝对的定义,谁也说不清楚…

 

应老总的要求,学习36qp.com的文章页面seo,我在dede系统的文章标题下创建了标题搜索引擎引导。这样可以引导用户或者爬行蜘蛛继续浏览其网站下的相关文章,增加pv
方法很简单,就是增加一系列的搜索引擎搜索该文章标题的链接,演示地址http://58w.cn/a/chess/gonggao/647.html。
在dede系统下增加如下代码即可:
在include/common.func.php下载增加下面的函数:

1
2
3
4
5
6
7
8
function sousuo($title){
    $str = '';
    $str = "<a href='http://www.baidu.com/s?wd=site:www.58w.cn ".$title."'><font color='red'>百度收录</font></a>";
    $str.= "&nbsp;<a href='http://www.google.com.hk/search?hl=zh-CN&source=hp&q=site:www.58w.cn ".$title."'><font color='blue'>谷歌收录</font></a>";
    $str.= "&nbsp;<a href='http://www.sogou.com/web?query=site:www.58w.cn ".$title."'><font color='green'>搜狗收录</font></a>";
    $str.= "&nbsp;<a href='http://www.soso.com/q?pid=s.idx&w=site:www.58w.cn+".$title."'><font color='#8E388E'>搜搜收录</font></a>";
    return $str;
}

在内容模板里使用如下代码:

1
{dede:field name='title' function='sousuo(@me)'/}
 

前几天做了一款基于jquery的滑动特效,也是简单实用,在这里把代码,演示地址和下载地址贴出来。
演示地址:http://www.wodeblog.com/jquery/huadong/
代码:
jquery-1.5.1.js和下面的代码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>左右滑动特效</title>
</head>
<style>
.kuang {
    width:750px;
    height:60px;
    padding:5px 0;
    border:1px solid #000;
    margin-top:200px;
    position: relative;
}
.fkuang {
    width:9999px;
    overflow:auto;
    height:60px;
    position:relative;
}
.sunkuang {
    width:150px;
    height:60px;
    position:relative;
    background:#999;
    float:left;
    text-align:center;
    line-height:60px;
    cursor:pointer;
    filter:Alpha(opacity=80);
    opacity:0.80;
}
.sunspan2{ width:10px; height:60px; float:left; background:#fff;}
.sunspan1{ width:140px; height:60px; float:left; border:none;}
</style>
<script type="text/javascript" src="jquery-1.5.1.js"></script>
<script type="text/javascript">
var i = 0;
function scrollpic(){
    i++;
    var $wrapper = $('.kuang').css('overflow', 'hidden'),
        $items = $('.kuang .sunkuang'),
        singleWidth = $items.filter("div:first").outerWidth(), //find是对它的子集操作,filter是对自身集合元素筛选,:first寻找第一个元素
        innersWidth = $wrapper.innerWidth(),//innerWidth() 返回第一个匹配元素的内部宽度(不包含边框),outerWidth()返回第一个匹配元素的外部宽度值 (包括边框)
        visible = Math.ceil(innersWidth / singleWidth);
        page = Math.ceil($items.length / visible);
        if(i==1){
            xnum = visible-$items.length % visible;
            tnum = $items.length;
           
        }
        if (($items.length % visible) != 0&&i==1) {
            $items.filter(':last').after($items.slice(0, tnum).clone());
            $items = $('.kuang .sunkuang');
        }
    var twidth=parseInt(tnum*singleWidth);
    var x=$("#kuangs").position().left;
    var y=parseInt(Math.abs(x));
    if(y==twidth){
        $("#kuangs").css("left",0);
    }
    $("#kuangs:not(:animated)").animate({left:"-=150px"}, "500");  
    setTimeout("scrollpic()",1000);
}
</script>
<body onLoad="scrollpic()">
<center>
  <div class="kuang">
    <div class="fkuang" id="kuangs">
      <div class="sunkuang"><span class="sunspan1">1</span><span class="sunspan2"></span></div>
      <div class="sunkuang"><span class="sunspan1">2</span><span class="sunspan2"></span></div>
      <div class="sunkuang"><span class="sunspan1">3</span><span class="sunspan2"></span></div>
      <div class="sunkuang"><span class="sunspan1">4</span><span class="sunspan2"></span></div>
      <div class="sunkuang"><span class="sunspan1">5</span><span class="sunspan2"></span></div>
      <div class="sunkuang"><span class="sunspan1">6</span><span class="sunspan2"></span></div>
    </div>
  </div>
</center>
</body>
</html>

下载地址:http://www.wodeblog.com/jquery/huadong.zip

© 2012 php个人工作经验以及生活体会博客 Suffusion theme by Sayontan Sinha