上一页 1 ··· 5 6 7 8 9 10 11 12 下一页
摘要: mixed preg_replace('正则','替换的新内容','需要被替换的原文')例:echo preg_replace('/3/', 4, '12345'); 以上例程会输出:12445 阅读全文
posted @ 2013-04-01 11:35 忆殇之痕 阅读(149) 评论(0) 推荐(0) 编辑
摘要: array preg_grep('正则',array,0)//返回匹配到数组形式,内容为包含元数组下表的数组array preg_grep('正则',array,PREG_GREP_INVERT)//返回不在匹配内容的数组形式,内容为包含元数组下表的数组例:$subjects=array( "MechanicalEngineering","Medicine", "SocialScience","Agriculture", "CommercialScience",& 阅读全文
posted @ 2013-04-01 11:22 忆殇之痕 阅读(245) 评论(0) 推荐(0) 编辑
摘要: int preg_match_all('正则','$str');//成功返回匹配到的数目,失败返回0 阅读全文
posted @ 2013-04-01 11:11 忆殇之痕 阅读(204) 评论(0) 推荐(0) 编辑
摘要: int preg_match('正则','$str','$arr'); //$arr 匹配后的内容//匹配成功返回1,失败返回0 阅读全文
posted @ 2013-04-01 11:09 忆殇之痕 阅读(159) 评论(0) 推荐(0) 编辑
摘要: apt-get install openssh-server //安装sshapt-get install vnc-server //安装vncapt-get install mysql-server mysql-client //安装mysqlapt-get install nginx //安装nginx /etc/init.d/nginx start 启动nginxapt-get install php5-fpm //安装php5-fpm安装Php各种扩展apt-get install php5-mysql php5-curl php5-g... 阅读全文
posted @ 2013-03-28 14:45 忆殇之痕 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 安装reids服务器 apt-get install redis-server测试是否安装成功 redis-cli安装phpredis扩展 #wgethttps://github.com/nicolasff/phpredis/downloads #tar -zxvf nicolasff-phpredis-2.1.3-124-gd4ad907.tar.gz # mv nicolasff-phpredis-d4ad907 php-5.3.8/ext/phpredis/ # cd php-5.3.8/ext/phpredis/ # /usr/local/php/bin/phpize ... 阅读全文
posted @ 2013-03-28 10:36 忆殇之痕 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 安装之前需要先安装libevent-dev支持 apt-get install libevent-devubuntu下安装beanstalkd sudo apt-get install beanstalked 阅读全文
posted @ 2013-03-27 18:03 忆殇之痕 阅读(233) 评论(0) 推荐(0) 编辑
摘要: $m = new Mongo("127.0.0.1"); //php连接mongodb$db = $m->mytest; //选择需要操作的库$collection = $db->user; //选择需要操作的表 集合$obj=array("name"=>"xiongwie"); //需要操作的数据$collection->insert($obj); //把数据加入到集合里//修改指定数据$collection->update(array("name"=>"xiongw 阅读全文
posted @ 2013-03-27 17:59 忆殇之痕 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 一、创建和查看数据库如果你想创建一个“myTest”的数据库,先运行use myTest命令,之后就做一些操作(如:db.createCollection('user')),这样就可以创建一个名叫“myTest”的数据库。 show dbs //查看有哪些库 use mytest //选择一个库 db.createCollection('user') //创建一个表 show collections //可以查看有哪些表 db.dropDatabase() //删除当前的库 db.stats() //当前数据库状态 db.getName() //查... 阅读全文
posted @ 2013-03-27 16:34 忆殇之痕 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 安装mongodb-server apt-get install mongodb-server安装mongodb-client apt-get install mongodb-clients在终端输入mongo即可进入mongodb数据库安装mongodb的php扩展模块:1.在http://pecl.php.net/package/mongo 选择需要的驱动版本下载;2.进入下载目录,解压下载的驱动文件,然后进入解压目录,执行如下命令:tar zxf mongo-1.1.4.tgzcd mongo-1.1.4phpize5 (如果没有phpize5,则可能得先执行sudo apt-get.. 阅读全文
posted @ 2013-03-27 15:56 忆殇之痕 阅读(264) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 下一页