摘要:
class Myclass(object): def __init__(self): pass #必须实例化才能调用 def sayhi(self): print 'hello' #静态方法,跟类没什么关系,不需要实例化即可调用,类的工具包 @staticmethod def sayhi2(self): ... 阅读全文
posted @ 2017-09-06 11:22
JahanGu
阅读(403)
评论(0)
推荐(0)
摘要:
新式类:class Myclass(object): pass 经典类:class Myclass: pass 新式类里面加了一些新方法,例如重写父类: class A(object): def __init__(self,name,age,sex): self.name = name self.a 阅读全文
posted @ 2017-09-06 11:20
JahanGu
阅读(273)
评论(0)
推荐(0)
摘要:
linux下安装: $:cd /php7.0/ext/mbstring 切换到源码包目录下 $:/usr/local/php/bin/phpize 执行这句 $:./configure –with-php-config=/usr/local/php/bin/php-config 重新编译 $:sud 阅读全文
posted @ 2017-09-06 11:18
JahanGu
阅读(402)
评论(0)
推荐(0)
摘要:
通过 Composer 安装 如果还没有安装 Composer,在 Linux 和 Mac OS X 中可以运行如下命令: curl -sS https://getcomposer.org/installer | php mv composer.phar /usr/local/bin/compose 阅读全文
posted @ 2017-09-06 11:15
JahanGu
阅读(263)
评论(0)
推荐(0)
摘要:
在数据库表中,对字段建立索引可以大大提高查询速度。假如我们创建了一个 mytable表: 复制代码 代码如下: CREATE TABLE mytable( ID INT NOT NULL, username VARCHAR(16) NOT NULL ); 我们随机向里面插入了10000条记录,其中有 阅读全文
posted @ 2017-09-06 11:14
JahanGu
阅读(1017)
评论(0)
推荐(0)
摘要:
1:在控制器内成员变量设置 public $layout = false; //不使用布局 public $layout = “main”; //设置使用的布局文件 2:在控制器成员方法内设置 $this->layout = false; //不使用布局 $this->layout = “main” 阅读全文
posted @ 2017-09-06 11:13
JahanGu
阅读(236)
评论(0)
推荐(0)
摘要:
问题: 能上传小于10k的文件,上传大于10k的文件就会报500错误 解决办法: 首先查看错误日志,看看报错是什么 其次查看client_body_temp的权限问题 linux下面输入命令nginx -V 看看自己的client_body_temp在哪个目录下 注意nginx运行的用户,目录权限包 阅读全文
posted @ 2017-09-06 11:12
JahanGu
阅读(2306)
评论(0)
推荐(0)

浙公网安备 33010602011771号