基于IIS服务器自动配置PHP和MySQL环境
本文所介绍的方式为使用zkeys安装包进行安装,整个过程非常简单,适合新手使用。安装PHP和MySQL服务器之前需要先安装IIS。软件版本: PHP 5.2.10eAccelerator0.9.5.3for PHP 5.2.10ZEND3.3.3MYSQL5.0.85PHPMYADMIN2...
Python正则采集邮箱脚本
def regcontent(urlstr): respose=urllib.request.urlopen(urlstr) html=respose.read() f=re.compile(r'\d{3,12}@.{2,3}.com') items=f...
Sublime Text2 汉化/破解
下载 SublimeText2并安装完成下载汉化包Sublime-Text-2中文包.zip将压缩包解压到Sublime-text-2/Packages/Default目录即可汉化完成注册码:----- BEGIN LICENSE -----Andrew WeberSing...
Bt种子转磁力链
test.php include 'BEncode.php';include 'BDecode.php'; $torrent_content = file_get_contents('filename.torrent'); $desc = BDecode($torrent_content);$in...
mysql 12条入门语句
连接到数据库服务器 mysql-h地址-u用户名-p密码;创建数据库 createdatabase库名;查看所有库 showdatabases;选择目标库 use库名;删除数据库 drop...
字符串的拆分与合并
拆分字符串可以使用explode('拆分字符',文本);合并字符串可以使用implode(数组,'合并字符');<?php$str='php,linux,mysql';$arr=explode(',',$str);//返回的类型为数组implode($arr,',');?>...
截取字符串
substr(文本,起始位置,结束位置)<?php$str = 'tommrow is another day';substr($str,0,3);substr($str,0,-3);//负数代表,文本结束位置从后往前数?>...
替换字符串
替换一个字符串可以用str_replace('替换的内容','用于替换的内容',数据)<?php$str ='hi,fuck';str_replace('fuck','f**k';$str);?>替换多个字符串可以用strtr(数据,array('参数1'=>'值1','参数2'=>'值2...
查找字符串
strpos—查找字符串首次出现的位置<?php$str = 'abcde';$char = 'a';if(strpos($str,$char) !== false){ echo '找到',$char;}else{ &nbs...
跳过循环与跳出循环
continue 在循环结构用用来跳过本次循环中剩余的代码并在条件求值为真时开始执行下一次循环。注意:continue接受一个可选的数字参数来决定跳过几重循环到循环结尾。默认值是1,即跳到当前循环末尾。<?phpwhile (list ($key, $value) = each($arr)) { if (!($key&nb...
友情链接
人生重开模拟器Powered By Cheug's Blog
Copyright Cheug Rights Reserved.