PHP
My_It5224
这个作者很懒,什么都没留下…
展开
-
php压缩图片
压缩图片大概有三种方法:1. $im = imagecreatefromjpeg('3.jpg'); imageinterlace($im, true); imagejpeg($im, './3.jpg');----------------------------------------------------------------------原创 2014-12-23 12:58:48 · 427 阅读 · 0 评论 -
laravel 在windows 下的安装和配置
laravel 在windows 下的安装和配置1.安装集成软件(xampp、wampserver、phpStudy …) 任意中的一种 2.下载laravel 包 http://down.golaravel.com/laravel/laravel-master.zip 解压到你项目根目录 D:\xampp\htdocs 3.安装composer https://原创 2016-04-28 15:02:41 · 5186 阅读 · 0 评论 -
php 中全半角转换
// 半角数组 $half = array( '0','1','2','3','4','5', '6','7','8','9','a','b', 'c','d','e','f','g','h', 'i','j','k','l','m','n', 'o','p','q','r','s','t', 'u','v','w','x','y','z', 'A',原创 2015-09-03 14:09:03 · 630 阅读 · 0 评论 -
thinkphp 验证码
thinkphp 验证码原创 2015-08-18 10:59:42 · 283 阅读 · 0 评论 -
php 下全角逗号和英文逗号的汉字字符串分割成数组
function sta($str){ $arr=array(); $data=array(); $len = mb_strlen($str); for($i=0;$i<$len;$i++){ $ch = mb_substr($str,$i,1); if($ch == ',' || $ch == ','){ $chpre =原创 2015-06-10 13:48:21 · 648 阅读 · 0 评论 -
centos 下的 ruby on ralis 配置
转载自:http://blog.163.com/pzy1991@yeah/blog/static/1220572312011112622419700/1.第一步su root ***安装依赖包yum -y install gcc yum install flex autoconf zlib curl zlib-devel curl-devel bzip2 bzip2-d转载 2015-06-16 14:01:50 · 572 阅读 · 0 评论 -
xmapp多工作目录配置
1.在“C:\Windows\System32\drivers\etc”的host(用超级用户打开)文件里加上“127.0.0.1 www.hxm.com” 2.检查“C:\xampp\apache\conf\httpd.conf” 里的“Include conf/extra/httpd-mpm.conf” 前没有“#”即是打开状态原创 2014-12-23 16:12:01 · 534 阅读 · 0 评论 -
php高级程序设计
第一部分:OPP和模式 第一章:抽象类、接口和契约式编程 1.1:抽象类 1.方法原型:(prototype)是指方法的定义中剔除方法体之后的签名。它包括存取级别、函数关键字,函数名称和参数。它不包 括({})或括号内的任何代码。例如:public f原创 2014-12-23 10:42:47 · 416 阅读 · 0 评论 -
php高级程序设计3
第二章 静态变量、成员和方法 2.1 静态变量 1.静态变量是只存在于函数作用域的变量,在函数执行完值不会丢失。 2.如下例: function testing(){ static $a = 1; $a *= 2; echo $原创 2015-01-12 10:44:22 · 445 阅读 · 0 评论 -
php高级程序设计2
1.2:接口 1.接口:接口只声明了方法体,而没有具体实现。而且接口中的方法都是抽象的,用关键字interface来创建一个接口,如果要实现一个接口用关键字 implements。而且接口可以实现多个。 例如:class MyClass implements IinterfaceClass1,Iin原创 2014-12-23 14:30:37 · 400 阅读 · 0 评论 -
CURL 请求外部接口 GET 和 POST
CURL 请求外部接口/** * GET方式请求 * @return mixed $result */protected function getData(){ // 取消SSL证书检验 curl_setopt($this->curlHandle, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($this->curlHandl原创 2017-03-01 17:45:13 · 2629 阅读 · 0 评论