摘要: 1 第一种方法 2 3 通过php的finfo_file() 4 5 $handle=finfo_open(FILEINFO_MIME_TYPE);//This function opens a magic database and returns its resource. 6 $fileInfo=finfo_file($handle,'./test.txt');// Return information about a file 7 finfo_close($handle); 8 print_r($fileInfo); 9 echo '===========&quo 阅读全文
posted @ 2013-07-22 10:27 尹少爷 阅读(481) 评论(0) 推荐(0) 编辑
摘要: 1 在 Ubuntu 12.04 安裝 Node.js 2 3 使用 nvm(Node Version Manage) 來安裝 node.js, 4 預先需要 curl, git, g++ : 5 6 $ sudo apt-get install git-core g++ curl 7 8 接著即可用以下指令安裝 : 9 10 $ git clone git://github.com/creationix/nvm.git ~/.nvm11 $ echo ". ~/.nvm/nvm.sh" >> ~/.bashrc12 13 14 重新開啟 terminal 或是 阅读全文
posted @ 2013-07-22 09:51 尹少爷 阅读(747) 评论(0) 推荐(0) 编辑