摘要: ===========PHP获取文件绝对路径======= ===========PHP获取文件绝对路径==================chdir() 函数===========定义和用法chdir() 函数把当前的目录改变为指定的目录。若成功,则该函数返回 true,否则返回 false。语法... 阅读全文
posted @ 2015-04-27 15:37 北京流浪儿 阅读(347) 评论(0) 推荐(0) 编辑
摘要: .htaccess文件配置1 2 RewriteEngine On3 RewriteBase /4 RewriteCond $1 !^(index\.php|assets|system|robots\.txt) 5 RewriteRule ^(.*)$ /index.php/$1 ... 阅读全文
posted @ 2015-04-24 08:11 北京流浪儿 阅读(326) 评论(0) 推荐(0) 编辑
摘要: buffer ---- flush()buffer是一个内存地址空间,Linux系统默认大小一般为4096(1kb),即一个内存页。主要用于存储速度不同步的设备或者优先级不同的 设备之间传办理数据的区域。通过buffer,可以使进程这间的相互等待变少。这里说一个通俗一点的例子,你打开文本编辑器编辑一... 阅读全文
posted @ 2015-04-23 16:57 北京流浪儿 阅读(4073) 评论(0) 推荐(1) 编辑
摘要: PHP的buffer是这样的:输出的字符串 => PHP buffer => 等待输出 => web 服务器的缓冲区 => tcp 缓冲区 => 客户端。过程其实相当的复杂。大概的工作机制:boolob_start ([callback$output_callback [,int$chunk_siz... 阅读全文
posted @ 2015-04-23 16:43 北京流浪儿 阅读(551) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2015-04-23 11:08 北京流浪儿 阅读(203) 评论(0) 推荐(0) 编辑
摘要: $csvname = $csvname . '.csv';header('Content-Type: application/vnd.ms-excel;charset=GB2312');header('Content-Disposition: attachment;filename="' . $cs... 阅读全文
posted @ 2015-04-23 10:57 北京流浪儿 阅读(312) 评论(0) 推荐(0) 编辑
摘要: var generic_pool = require('generic-pool');var pool = generic_pool.Pool({ name: 'mysql', max: 10, create: function(callback) { var Client = requ... 阅读全文
posted @ 2015-04-22 22:20 北京流浪儿 阅读(1170) 评论(0) 推荐(0) 编辑
摘要: /* hash.js */ var crypto = require('crypto');module.exports = function(){ this.encode = function(){ var algorithm = arguments[0] ? arguments[0] ... 阅读全文
posted @ 2015-04-22 22:19 北京流浪儿 阅读(289) 评论(0) 推荐(0) 编辑
摘要: 1. 查看物理CPU的个数 #cat /proc/cpuinfo |grep "physical id"|sort |uniq|wc -l2. 查看逻辑CPU的个数#cat /proc/cpuinfo |grep "processor"|wc -l3. 查看CPU是几核#cat /proc/cpui... 阅读全文
posted @ 2015-04-22 22:11 北京流浪儿 阅读(606) 评论(0) 推荐(0) 编辑
摘要: ssh 用户名@ip#远程指定管理指定Linux服务器,连接时会生成公钥scp [-r] 用户名@ip:远程路径 本地路径#下载文件本机是 192.168.0.252,从253上下载文件scp -r root@192.168.0.253/root/123 /rootscp [-r] 本地文件 用户名... 阅读全文
posted @ 2015-04-22 08:37 北京流浪儿 阅读(150) 评论(0) 推荐(0) 编辑