显示下一条  |  关闭

huzhangsheng的博客

淡泊于明志,宁静于致远,不为美色而迷,不为美食而惑,让心自由,追名逐利,一切皆空

 
 
 
 
 
 
 
 
 
 
下载音乐盒  曲目表歌词秀
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

ubuntu 11.10 server 设置 wifi 热点

2011-10-14 6:30:20 阅读297 评论0 142011/10 Oct14

先安装好系统,安装时勾选 ssh dns samber 服务,手动设置 dhcp。

一、编辑网卡设置

sudo nano /etc/network/interfaces

#外网IP,是 VMWARE NAT IP

auto eth0

iface eth0 inet static

    address 192.168.10.10

    netmask 255.255.255.0

    network 192.168.10.0

    broadcast 192.168.10.255

    gateway 192.168.10.2

#以下为无线网卡 IP

auto wlan0

iface wlan0 inet static

    address 192.168.0.1

    netmask 255.255.255.0

    network 192.168.0.0

    broadcast 192.168.0.255

auto wlan1

iface wlan0 inet static

作者  | 2011-10-14 6:30:20 | 阅读(297) |评论(0) | 阅读全文>>

windows 7 设置 Wi-Fi 热点

2011-8-13 19:19:49 阅读156 评论0 132011/08 Aug13

做一个批处理 wifi.bat ,内容如下:

rem 每次开机用管理员运行这个批处理

rem 启动无线网络

netsh wlan set hostednetwork mode=allow ssid=hzs key=123456789

netsh wlan start hostednetwork

rem 对连接互联网的设备 设置网络共享,家庭网络连接通过虚拟 WiFi 网卡--Microsoft Virtual WiFi Miniport Adapter

rem 连接到互联网,方式是 WPA/WPA2 PSK,输入密码:123456789

按照注释操作就可以了.

作者  | 2011-8-13 19:19:49 | 阅读(156) |评论(0) | 阅读全文>>

ubuntu 10.10 apache index.php index.html

2011-6-17 8:46:32 阅读121 评论0 172011/06 June17

在 ubuntu 10.10 中,要更改 apache 的默认索引文件

sudo vim /etc/apache2/mods-enabled/dir.conf

<IfModule dir_module>

    DirectoryIndex index.html index.php #在这里修改

</IfModule>

重启 apache2

sudo /etc/init.d/apache2 restart

作者  | 2011-6-17 8:46:32 | 阅读(121) |评论(0) | 阅读全文>>

php 缓存效率

2011-6-5 8:19:39 阅读58 评论0 52011/06 June5

在做临川十中资源中心时,为了快速完成,使用了动态语言 php ,缓存用的是 secache,使用 apache 压力测试,发现缓存的效率还没有直接从数据库中读取高

1、直接从 mysql 中读取

Percentage of the requests served within a certain time (ms)

  50%   1328

  66%   1453

  75%   1578

  80%   1641

  90%   1875

  95%   2000

  98%   2078

  99%   2219

 100%   4578 (longest request)

2、使用缓存,从缓存中读取

Percentage of the requests served within a certain time (ms)

  50%   1469

  66%   1672

  75%   1828

作者  | 2011-6-5 8:19:39 | 阅读(58) |评论(0) | 阅读全文>>

apache + php 防盗链

2011-6-1 19:59:32 阅读100 评论0 12011/06 June1

我这个月在编写资源中心,学校示范校检查要用。

这是下载文件防盗链代码 down.php

session_start();

if (isset($_GET["action"])) {

    $action = filter_var($_GET["action"], FILTER_SANITIZE_STRING);

    switch ($action) {

        case "image":

downfilter();

            break;

        case "down":

            downloadFile($_SESSION["downfilename"]);

            break;

    }

}

function downloadFile($fullPath) {

// Must be fresh start

    if (headers_sent())

        die('Headers Sent');

// Required for some browsers

    if (ini_get('zlib.output_compression'))

        ini_set('zlib.output_compression', 'Off');

作者  | 2011-6-1 19:59:32 | 阅读(100) |评论(0) | 阅读全文>>

查看所有日志>>

 
 
 
 
 
 

网易新闻资讯

 
 
 
 
新闻标题 
列表加载中...
 
 
 
 
 
 
 

江西省 抚州市 狮子座

 发消息  写留言

 
喜欢电脑,希望与大家共同进步
 
博客等级加载中...
今日访问加载中...
总访问量加载中...
最后登录加载中...
 
 
 
 
 
 
 
心情随笔列表加载中...
 
 
 
 
 
 
 
日志评论
评论列表加载中...
 
 
 
 
 
 我要留言
 
 
 
留言列表加载中...
 
 
 
 
 
 
 
博友列表加载中...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2012

   
创建博客 登录  
 关注