上一页 1 2 3 4 5 6 ··· 16 下一页
摘要: 添加 app.set('views', __dirname + '/views') 修改 app.use(express.static(__dirname + '/public')); express-handlebars.js源代码修改 layoutsDir : '../usr/local/lib 阅读全文
posted @ 2015-09-14 02:08 庄昌宽 阅读(219) 评论(0) 推荐(0) 编辑
摘要: yum check-update yum install vsftpdvi /etc/vsftpd/vsftpd.conf anonymous_enable=NO service vsftpd startuseradd -s /sbin/nologin -d /var/www/ aatii(为默认f 阅读全文
posted @ 2015-09-14 02:01 庄昌宽 阅读(776) 评论(0) 推荐(0) 编辑
摘要: 处理HTML表单通过$_REQUEST['city'];访问,$_REQUESTcity大小写拼写必须要完全相同(name属性值)$_REQUEST是一个特殊的变量类型,称为超全局变量(后面详细讲)if(condition){ //Do something}elseif(condition2){ ... 阅读全文
posted @ 2015-02-07 21:09 庄昌宽 阅读(377) 评论(0) 推荐(0) 编辑
摘要: PHP内嵌在HTML中,置于标签内一般php文件扩展名.php在body结算标签之前对于远程服务器,可以用ftp工具传程序打印语句echo'Hello World!';print"Hello World";涉及函数名时,php不区分大小写Echo'Hello World!';php里有配置文件严格来... 阅读全文
posted @ 2015-02-04 00:06 庄昌宽 阅读(1339) 评论(0) 推荐(0) 编辑
摘要: 桥接模式(将抽象与其实现隔离开来,以便二者独立变化)function sendInfo(element){ var id=element.id; ajax("GET","info.json?id="+id,function(result){ //... }); ... 阅读全文
posted @ 2015-01-20 22:09 庄昌宽 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 链式调用(function(){ function _$(els){ //... } _$.prototype={ each:function(fn){ for(var i=0,len=this.elements.length;i<... 阅读全文
posted @ 2015-01-15 23:56 庄昌宽 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 单体模式:用来划分命名空间而组织一些方法和属性的对象,如果它能被实例化,只能被实例化一次;但对象不是单体var Singleton={ attr1:true; attr2:2, method1:function(){ ... }, method2:func... 阅读全文
posted @ 2015-01-13 21:52 庄昌宽 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 子类引用父类function extend(subClass,superClass){ var F=function(){}; F.prototype=superClass.prototype; subClass.prototype=new F(); subClass.pro... 阅读全文
posted @ 2015-01-10 19:29 庄昌宽 阅读(107) 评论(0) 推荐(0) 编辑
摘要: 静态成员是直接通过类对象访问的var Book=(function(){ var numOfBooks=0; function checkIsbn(isbn){ ... } return function(newIsbn,newTitle,newAuthor){... 阅读全文
posted @ 2015-01-09 02:40 庄昌宽 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 门户大开式对象var Book=function(isbn,title,author){ if (isbn==undefined) throw new Error("不合法"); this.isbn=isbn; this.title=title||'无标题'; this.au... 阅读全文
posted @ 2015-01-07 22:09 庄昌宽 阅读(146) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 16 下一页