随笔分类 - php
摘要:public static function arr_split_zh($tempaddtext){ $tempaddtext = iconv("UTF-8", "gb2312", $tempaddtext); $cind = 0; $arr_cont = []; for($i = 0; $i <
阅读全文
摘要:composer 获取 Yii配置 hughcube/yii2-mobile-attribution $config['components']['mobile_attribution'] = [ 'class' => 'hughcube\mobileAttribution\Component',
阅读全文
摘要:$url='http://static.assets.local.51rwb.com/caibeitv/html/caibeitv_hao/dev/images/logo.png';$content= file_get_contents($url,true);header("Content-Type
阅读全文
摘要:$doc = new DOMDocument();$doc->load('bird_base.xml');$root = $doc->getElementsByTagName('birdList');$root = $root->item(0);$bird = $root->getElementsB
阅读全文
摘要:将数组变成json字符串,但是不会讲内容编码 json_encode($content, JSON_UNESCAPED_UNICODE)
阅读全文
摘要:PHPExcel下载地址 http://phpexcel.codeplex.com/ 读取的源码
阅读全文
摘要:$num=0; //用来记录目录下的文件个数$dirname='files/faces'; //要遍历的目录名字$dir_handle=opendir($dirname);echo '';echo '目录'.$dirname.'下面的内容';echo '';echo '文件名文件大小文件类型修改时间';while($file=readdir($dir_handle)){ if($f...
阅读全文
摘要:学习网址 https://github.com/chrisboulton/php-resque
阅读全文
摘要:redis安装与使用参考网址 http://redis.io/topics/quickstart curl -O http://download.redis.io/redis-stable.tar.gztar xvzf redis-stable.tar.gzcd redis-stablemake 配
阅读全文
摘要:优点:不需要启动web服务器 首先定位到index.php目录 php index.php controller_name function_name $param 如果配置文件有多个需指定具体的 CI_ENV=production php index.php controller_name fun
阅读全文
摘要:/** * @param $data 需要加密的字符串 * @param $key 加密的密码 * @return string 加密后的字符串 */function _encrypt($data, $key){ $key = md5($key); $x = 0; $len = strlen($da
阅读全文
摘要: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
阅读全文
摘要:应用配置文件 server { listen 80; server_name local.core.api; root /Users/li/Documents/www/CoreAPI/; location / { index index.php; autoindex on; if (!-f $req
阅读全文
摘要:下列是nginx.conf全局配置文件 worker_processes 1; error_log /tmp/logs/nginx-error.log; events { worker_connections 1024; } http { include mime.types; default_ty
阅读全文
摘要:声明:该环境是在黑苹果系统下搭建 安装Homebrew 最近工作环境切换到Mac,所以以OS X Yosemite(10.10.1)为例,记录一下从零开始安装Mac下LNMP环境的过程 确保系统已经安装xcode,然后使用一行命令安装依赖管理工具Homebrew ruby -e "$(curl -f
阅读全文
摘要:function baidu_map_api($location=''){ $curl_url = "http://api.map.baidu.com/geocoder?output=json&location=".$location; //初始化 $curl = curl_init(); //设置
阅读全文

浙公网安备 33010602011771号