上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 28 下一页
摘要: 情景如下:http://sh.test.local 指向 test_sh 目录http://gz.test.local 指向 test_gz 目录使用域名 http://img.test.local专门用来放图片,以便浏览器加载的,但事实上是,http://img.test.local 是要根据不同主访问来指定不同的图片目录的,比如说,通过http://sh.test.local 的时候,访问的是 test_sh/upload/images 里面的文件通过http://gz.test.local 的时候,访问的是 test_gz/upload/images 里面的文件这时候,就要通过迂回的方法 阅读全文
posted @ 2012-12-03 18:04 DavidHHuan 阅读(11544) 评论(0) 推荐(0) 编辑
摘要: git跟svn的原理是不一样的,svn可以直接 svn up file/to/path,而git由于在远程和本地都有一个代码库,所以操作起来麻烦一点gitfetchgitcheckoutorigin/master--path/to/file 阅读全文
posted @ 2012-11-28 11:23 DavidHHuan 阅读(11110) 评论(0) 推荐(0) 编辑
摘要: 1. At first you should download the java fromhttp://java.com/en/download/index.jspextract it, here i locate it in ~/Software/jdk2. Make sure that there is the folder ~/.mozilla/plugins which once you have install firefox3. ln the extension.sudo ln -s ~/Software/jdk/lib/amd64/libnpjp2.so ~/.mozilla/p 阅读全文
posted @ 2012-11-22 02:34 DavidHHuan 阅读(10342) 评论(0) 推荐(0) 编辑
摘要: When developing distributed applications with Yii, naturally, we will face that we have toshare the session in different machine. So here we will use memcache to do it.here is the example to store the session with memcache in Yii, in the main.php file: 'cache'=>array('class'=>& 阅读全文
posted @ 2012-11-22 02:09 DavidHHuan 阅读(10743) 评论(1) 推荐(0) 编辑
摘要: 其实网上有很多教程的,不过他们基本只是提供如下代码: /***/$('.public-leftimg').each(function(){varx=100;//填入目标图片宽度vary=100;//填入目标图片高度varw=$(this).width();varh=$(this).height();//获取图片宽度、高度if(w>x){//图片宽度大于目标宽度时varw_original=w,h_original=h;h=h*(x/w);//根据目标宽度按比例算出高度w=x;//宽度等于预定宽度if(h<y){//如果按比例缩小后的高度小于预定高度时w=w_orig 阅读全文
posted @ 2012-11-20 12:43 DavidHHuan 阅读(1551) 评论(0) 推荐(0) 编辑
摘要: At first, you have to install the xdebug, for the details, you can check anthoer article:http://www.cnblogs.com/davidhhuan/archive/2011/09/28/2194851.htmlinstall pythoninstallgraphvizsudo apt-get install graphviz2. download the webgrindhttps://github.com/jokkedk/webgrinduncompress it, and locate it 阅读全文
posted @ 2012-11-20 11:46 DavidHHuan 阅读(780) 评论(0) 推荐(0) 编辑
摘要: 搭建的FTP服务器vsftpd,用户上传的文件用给其它用户查看,这个要怎样修改上传的文件的默认权限呢?打开配置文件sudo vim /etc/vsftpd/vsftpd.conf修改(通常都是去掉注释)local_umask=022这样就可以了Have fun with CentOS! 阅读全文
posted @ 2012-11-20 11:10 DavidHHuan 阅读(875) 评论(0) 推荐(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 阅读(2391) 评论(0) 推荐(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 阅读(306) 评论(0) 推荐(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 阅读(261) 评论(0) 推荐(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 阅读(551) 评论(0) 推荐(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 阅读(390) 评论(0) 推荐(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 阅读(476) 评论(0) 推荐(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 阅读(682) 评论(0) 推荐(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 阅读(1553) 评论(0) 推荐(1) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 28 下一页