随笔分类 -  php

摘要:public static function arr_split_zh($tempaddtext){ $tempaddtext = iconv("UTF-8", "gb2312", $tempaddtext); $cind = 0; $arr_cont = []; for($i = 0; $i < 阅读全文
posted @ 2016-10-21 15:58 秋风落叶. 阅读(295) 评论(0) 推荐(0)
摘要:composer 获取 Yii配置 hughcube/yii2-mobile-attribution $config['components']['mobile_attribution'] = [ 'class' => 'hughcube\mobileAttribution\Component', 阅读全文
posted @ 2016-09-27 15:38 秋风落叶. 阅读(159) 评论(0) 推荐(0)
摘要:$url='http://static.assets.local.51rwb.com/caibeitv/html/caibeitv_hao/dev/images/logo.png';$content= file_get_contents($url,true);header("Content-Type 阅读全文
posted @ 2016-09-19 19:57 秋风落叶. 阅读(1012) 评论(0) 推荐(0)
摘要:$doc = new DOMDocument();$doc->load('bird_base.xml');$root = $doc->getElementsByTagName('birdList');$root = $root->item(0);$bird = $root->getElementsB 阅读全文
posted @ 2016-07-07 16:23 秋风落叶. 阅读(1528) 评论(0) 推荐(0)
摘要:将数组变成json字符串,但是不会讲内容编码 json_encode($content, JSON_UNESCAPED_UNICODE) 阅读全文
posted @ 2016-06-14 17:11 秋风落叶. 阅读(119) 评论(0) 推荐(0)
摘要:PHPExcel下载地址 http://phpexcel.codeplex.com/ 读取的源码 阅读全文
posted @ 2016-06-13 16:10 秋风落叶. 阅读(299) 评论(0) 推荐(0)
摘要:$num=0; //用来记录目录下的文件个数$dirname='files/faces'; //要遍历的目录名字$dir_handle=opendir($dirname);echo '';echo '目录'.$dirname.'下面的内容';echo '';echo '文件名文件大小文件类型修改时间';while($file=readdir($dir_handle)){ if($f... 阅读全文
posted @ 2016-05-30 09:27 秋风落叶. 阅读(934) 评论(0) 推荐(0)
摘要:学习网址 https://github.com/chrisboulton/php-resque 阅读全文
posted @ 2016-05-25 10:43 秋风落叶. 阅读(230) 评论(0) 推荐(0)
摘要:redis安装与使用参考网址 http://redis.io/topics/quickstart curl -O http://download.redis.io/redis-stable.tar.gztar xvzf redis-stable.tar.gzcd redis-stablemake 配 阅读全文
posted @ 2016-05-10 10:44 秋风落叶. 阅读(127) 评论(0) 推荐(0)
摘要:优点:不需要启动web服务器 首先定位到index.php目录 php index.php controller_name function_name $param 如果配置文件有多个需指定具体的 CI_ENV=production php index.php controller_name fun 阅读全文
posted @ 2016-04-20 15:16 秋风落叶. 阅读(442) 评论(0) 推荐(0)
摘要:/** * @param $data 需要加密的字符串 * @param $key 加密的密码 * @return string 加密后的字符串 */function _encrypt($data, $key){ $key = md5($key); $x = 0; $len = strlen($da 阅读全文
posted @ 2016-04-18 13:18 秋风落叶. 阅读(828) 评论(0) 推荐(0)
摘要:nginx.pi无法运行 ssued a nginx -s stop and after that I got this error when trying to reload it. [error]: invalid PID number "" in "/var/run/nginx.pid" Th 阅读全文
posted @ 2016-04-05 15:04 秋风落叶. 阅读(446) 评论(0) 推荐(0)
摘要:应用配置文件 server { listen 80; server_name local.core.api; root /Users/li/Documents/www/CoreAPI/; location / { index index.php; autoindex on; if (!-f $req 阅读全文
posted @ 2016-04-05 14:52 秋风落叶. 阅读(767) 评论(0) 推荐(0)
摘要:下列是nginx.conf全局配置文件 worker_processes 1; error_log /tmp/logs/nginx-error.log; events { worker_connections 1024; } http { include mime.types; default_ty 阅读全文
posted @ 2016-04-05 14:51 秋风落叶. 阅读(127) 评论(0) 推荐(0)
摘要:声明:该环境是在黑苹果系统下搭建 安装Homebrew 最近工作环境切换到Mac,所以以OS X Yosemite(10.10.1)为例,记录一下从零开始安装Mac下LNMP环境的过程 确保系统已经安装xcode,然后使用一行命令安装依赖管理工具Homebrew ruby -e "$(curl -f 阅读全文
posted @ 2016-04-02 11:22 秋风落叶. 阅读(414) 评论(0) 推荐(0)
摘要:function baidu_map_api($location=''){ $curl_url = "http://api.map.baidu.com/geocoder?output=json&location=".$location; //初始化 $curl = curl_init(); //设置 阅读全文
posted @ 2016-03-29 13:51 秋风落叶. 阅读(203) 评论(0) 推荐(0)