共26页: 首页 上一页 5 6 7 8 9 10 11 12 13 下一页 末页 
摘要: 搭建的FTP服务器vsftpd,用户上传的文件用给其它用户查看,这个要怎样修改上传的文件的默认权限呢?打开配置文件sudo vim /etc/vsftpd/vsftpd.conf修改(通常都是去掉注释)local_umask=022这样就可以了Have fun with CentOS!阅读全文
posted @ 2012-11-20 11:10 DavidHHuan 阅读(256) 评论(0) 编辑
摘要: When i set the virtualhost as:VirtualDocumentRoot/var/www/%1<VirtualHost*:80>DocumentRoot/var/wwwServerNamemyhost</VirtualHost>I got these error: Syntaxerroronline33of/etc/apache2/sites-enabled/000-default:Invalidcommand'VirtualDocumentRoot',perhapsmisspelledordefinedbyamodulenot阅读全文
posted @ 2012-11-13 12:04 DavidHHuan 阅读(1282) 评论(0) 编辑
摘要: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function.出现这个问题,主要是因为没有在 php.ini 里面对时区进行设置造成的,解决方法是,修改 php.ini,加入:date.timezone="Asia/Chongqing"重启 apache,搞掂!阅读全文
posted @ 2012-11-12 13:48 DavidHHuan 阅读(204) 评论(0) 编辑
摘要: here is the code for example:#!/bin/bashecho-e"your_password\nyour_password"|sudo/home/davidhhuan/the_shell_you_want_to_run.sh阅读全文
posted @ 2012-11-12 11:34 DavidHHuan 阅读(166) 评论(0) 编辑
摘要: 原文地址:http://www.myhack58.com/Article/sort099/sort0102/2011/31794.htm一、搭建环境:1、CentOS 6.0虚拟机(最小安装)2、putty3、ssh shell二、准备工作:1、源码包autoconf ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.xzfreetype http://nchc.dl.sourceforge.net/project/freetype/freetype2/2.4.10/freetype-2.4.10.tar.bz2gd http://case...阅读全文
posted @ 2012-10-29 19:05 DavidHHuan 阅读(290) 评论(0) 编辑
摘要: 一、安装并配置MySQL1.1 执行yum命令安装MySQLyum -y install mysql mysql-server1.2 把添加MySQL进开机启动项,并立即启动MySQLchkconfig --levels 235 mysqld on/etc/init.d/mysqld start1.3 设置MySQL root帐号密码mysql_secure_installation二、安装Apache2.1 使用yum命令安装Apacheyum –y install httpd2.2 设置开机启动Apachechkconfig --levels 235 httpd on2.3 启动Apach阅读全文
posted @ 2012-10-29 18:57 DavidHHuan 阅读(262) 评论(0) 编辑
摘要: gvim是一个神器,不过用它来管理项目的话,有点麻烦,主要是每次关闭了gvim,里面打开的文件记录都会没了,下次打开的时候,又要重新去打开。下面介绍一种方法,用来保存整个项目的文件打开情况。1. 建立文件夹 /home/your_home_folder/.vimsession2. 编辑 /etc/vim/gvimrc"保存/加载项目letg:sessionPath="/home/davidhhuan/.vimsession/""保存当前项目的文件打开情况functionSaveProject()letprojectName=input("ple阅读全文
posted @ 2012-10-15 18:03 DavidHHuan 阅读(274) 评论(0) 编辑
摘要: All the content of this article only happend in Yii Framework!As we know, with a form, we can both use post and get to send the data. But in Yii, when creating a form as below:<?phpechoCHtml::beginForm('user/index','get');?><?phpechoCHtml::label('User','user01阅读全文
posted @ 2012-10-15 10:10 DavidHHuan 阅读(494) 评论(0) 编辑
摘要: 情景一,通过 define 定义全局常量//首先定义了一个叫做MAXSIZE的常量define("MAXSIZE",100);//定义一个变量,它的值就是'MAXSIZE'这个字符串$str='MAXSIZE';//通过输出$str这个变量可以得到100这个值echoconstant($str);情景二,类或者接口里面通过 const 定义的常量interfacebar{consttest='foobar!';}classfoo{consttest='foobar!';}$const='test'阅读全文
posted @ 2012-10-11 11:46 DavidHHuan 阅读(416) 评论(0) 编辑
摘要: As we know, in Yii, we can set the error handler to display some useful message to the user.But, when i want to display different views in different modules, how to do it?Here is the way.In your module, here let say we have a admin module, there isAdminModule.php in it,then add the code as below:pub阅读全文
posted @ 2012-10-03 16:55 DavidHHuan 阅读(486) 评论(0) 编辑
摘要: After updated the Ubuntu12.04 with the update-package, i run the virtualbox with Win7, then igot these errors: Failedtoopenasessionforthevirtualmachinewin7.Thevirtualmachine'win7'hasterminatedunexpectedlyduringstartupwithexitcode1.ResultCode:NS_ERROR_FAILURE(0x80004005)Component:MachineInter阅读全文
posted @ 2012-10-02 10:05 DavidHHuan 阅读(535) 评论(0) 编辑
摘要: 当使用一些开源的分享按钮,如 jiathis,我们可以在分享的时候,加入一些图片,如以 jiathis 为例,可以通过设置参数varjiathis_config={boldNum:0,siteNum:7,showClose:false,sm:"t163,kaixin001,renren,douban,tsina,tqq,tsohu",imageUrl:"http://v2.jiathis.com/code/images/r5.gif",imageWidth:26,marginTop:150,url:"http://www.jiathis.com阅读全文
posted @ 2012-09-20 15:10 DavidHHuan 阅读(534) 评论(0) 编辑
摘要: From the code generated by the yiic, as we know, using these code can only get id and username from Yii::app()->user after logined:$identity=newUserIdentity($_POST['LoginForm']['username'],$_POST['LoginForm']['password']);Yii::app()->user->login($identity);bu阅读全文
posted @ 2012-09-07 14:01 DavidHHuan 阅读(302) 评论(0) 编辑
摘要: Virtualbox实现虚拟机与主机互相访问,并且虚拟机成为主机所在局域网的一台可访问机器主机A:window XP sp3虚拟机B:window XP sp3在A使用VirtualBox里面搭建B,实现B与A互相访问,并且B成为A所在局域网的一台可访问机器,目的是为了测试不同的IE(纯净的IE,非使用那些IEtester,IEcollection)下面的网站显示,同时为了方便其它同事也能够使用B,所以才写下这篇文章来记录一下。安装VirtualBox在A里面安装VirtualBox,然后按照常规做法安装好B(详细过程可google之)。设置B的网络网卡1:网卡2:也就是说,网卡1使用桥接模式阅读全文
posted @ 2012-08-31 11:54 DavidHHuan 阅读(531) 评论(0) 编辑
摘要: i am developing a plugin for getting rss from a website which is utf-8, when loading the code from the site, i got these error:<type'exceptions.UnicodeDecodeError'>:'ascii'codeccan'tdecodebyte0xe5inposition9here is the code what i used before: title=entry_rss.title.encode(&阅读全文
posted @ 2012-08-24 10:56 DavidHHuan 阅读(850) 评论(0) 编辑
共26页: 首页 上一页 5 6 7 8 9 10 11 12 13 下一页 末页