随笔分类 - php
            
    mac开启php中redis扩展
    
            
            
        
摘要:phpinfo(); 首先下载phpredis扩展包 https://github.com/chaihy/phpredis.git 解压 cd phpredis 运行phpize,生成configure文件 sudo phpize sudo ./configure sudo make && make
        阅读全文
            
        
            
    mac ci框架安装使用 memcached存session
    
            
            
        
摘要:mac 安装memcached brew info memcached brew install memcached brew install memcached 安装过程具体不详细多讲 memcached -h 然后启动memcached memcached -d -l 127.0.0.1 -p 
        阅读全文
            
        
            
    PHP7 ci框架session存文件,登录的时候session不能读取
    
            
            
        
摘要:config.php配置 $config['sess_driver'] = 'files';//以文件存储session $config['sess_cookie_name'] = 'ci_session'; $config['sess_expiration'] = 7200; $config['s
        阅读全文
            
        
            
    ci框架memcached使用
    
            
            
        
摘要:首先第一步需要安装memcached扩展 安装方法这里就不叙述了 application/config/memcached.php配置
        阅读全文
            
        
            
    php数组判断值相等时出现的次数,0,1,2这样的
    
            
            
        
摘要:方法1: $arr = array(array( 0=> array('a'=>1), 1=> array('a'=>3), 2=> array('a'=>4), 3=> array('a'=>3), 4=> array('a'=>1), 5=> array('a'=>3), 6=> array('
        阅读全文
            
        
            
    yii2入门安装 Windows7+wamp+yii2
    
            
            
        
摘要:1.首先先具备环境,下载最新wamp(yii2需要php5.40以上版本的http://www.digpage.com/install.html) wamp下载http://pan.baidu.com/s/1bp6IEf1 秘钥:5y7q C:\wamp\www\目录下新建项目名称 yii2 2.下
        阅读全文
            
        
            
    php读取excel时间42930转化为时间然后正则验证时间是否通过
    
            
            
        
摘要:excel时间 function exceltimtetophp($days,$time=false) { if(is_numeric($days)) { //凯撒日计数,要把我们运用的从1970年开始的日期运用函数GregorianToJD(),转换为凯撒日计数 $jd = GregorianTo
        阅读全文
            
        
            
    php删除文件夹下面所有文件包括(删除文件夹)不删除文件夹
    
            
            
        
摘要:function deldir($dir) { //先删除目录下的文件: $dh=opendir($dir); while ($file=readdir($dh)) { if($file!="." && $file!="..") { $fullpath=$dir."/".$file; if(!is_
        阅读全文
            
        
            
    Message: Only variable references should be returned by reference
    
            
            
        
摘要:由于ci框架升级导致 进入system/core/common.php 257行
        阅读全文
            
        
            
    tp框架  php ajax 登陆
    
            
            
        
摘要:html 文件 <form class="form-signin loginform" role="form"> <input type="text" id="logName" name="name" class="form-control login_user" placeholder="用户名/
        阅读全文
            
        
            
    php ajax bootstrap多文件上传图片预览,ajax上传文件
    
            
            
        
摘要:<form enctype="multipart/form-data" id="upForm"> <label class="btn btn-info" for="picture" title="Upload image file" id="uploadImgBtn" class="image_up
        阅读全文
            
        
            
    mac  Nginx+CI出现404错误
    
            
            
        
摘要:主要是ci框架需要配置rewrite nginx.conf配置文件添加: location /wechat/ { if (!-e $request_filename) { rewrite ^/wechat/(.*)$ /wechat/index.php?q=$uri&$args; } } 注:wec
        阅读全文
            
        
            
    mac nginx+php-fpm配置(安装过后nginx后访问php文件下载,访问php文件请求200显示空白页面)
    
            
            
        
摘要:访问php文件下载是因为没配置php-fpm 两个问题主要都是nginx.conf配置的问题: /usr/local/etc/nginx/nginx.conf server { listen 80; server_name localhost; root /usr/local/var/www; #c
        阅读全文
            
        
            
    codeigniter在nginx下返回404 not found
    
            
            
        
摘要:codeigniter框架需要path_info的支持,Apache默认支持path_info,但是nginx默认不支持,我们需要设置nginx,使得nginx支持path_info 网上试了好多方法最总才解决希望对大家有所帮助:(我的mac版的,具体设置看你们的需要,把重点的红色显示) serve
        阅读全文
            
        
            
    ci框架url去掉index.php
    
            
            
        
摘要:去掉index.php: 1、修改配置文件, $config['index_page'] = ' '; 设置空 2、修改Apache,搜索 htaccess 将 AllowOverride None 改为 AllowOverride All 搜索 rewrite_module modules/mod
        阅读全文
            
        
            
    ci框架多语言切换
    
            
    
摘要:1、多语言切换首先配置config文件默认语言 2、创建自己的语言包:language chinese english目录下的语言包文件名必须以 xx_lang.php 可根据自己的需求创建数组: 3、控制器如下: $this->lang->load($lang,$language); 加载语言包,
        阅读全文
            
        
 
                     
                    
                 
                    
                 
 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号