随笔分类 -  PHP

上一页 1 2 3 4 5 6 ··· 18 下一页
网站语言
摘要:Mobile.class.php 1 12 * Nick Ilyin 13 * 14 * Original author: Victor Stanciu 15 * 16 * @lice... 阅读全文
posted @ 2015-06-26 17:12 幻星宇 阅读(3430) 评论(0) 推荐(0)
摘要:";echo "今天:",date("Y-m-d",strtotime("18 june2008")),"";echo "昨天:",date("Y-m-d",strtotime("-1 day")),"";echo "明天:",date("Y-m-d",strtotime("+1 day")),""... 阅读全文
posted @ 2015-06-24 10:45 幻星宇 阅读(6284) 评论(0) 推荐(0)
摘要:在PHP中,strlen与mb_strlen是求字符串长度的函数,但是对于一些初学者来说,如果不看手册,也许不太清楚其中的区别。下面通过例子,讲解这两者之间的区别。先看例子:';//14 echomb_strlen($str,'utf8').'';//6 echomb_strlen($str,'gb... 阅读全文
posted @ 2015-06-10 16:37 幻星宇 阅读(271) 评论(0) 推荐(0)
摘要:使用 mb_detect_encoding() 函数来判断字符串是什么编码的。当在php中使用mb_detect_encoding函数进行编码识别时,很多人都碰到过识别编码有误的问题,例如对与GB2312和UTF- 8,或者UTF-8和GBK(这里主要是对于cp936的判断),网上说是由于字符短是,... 阅读全文
posted @ 2015-05-27 23:00 幻星宇 阅读(2723) 评论(0) 推荐(1)
摘要:服务器配置命令开始(蓝色为输入命令,灰色为反馈内容):Yum updateReboot;yum -y install mysql mysql-server mysql-devel php php-devel php-commonphp-gd php-curl php-prec php-xml php... 阅读全文
posted @ 2015-05-14 09:37 幻星宇 阅读(343) 评论(0) 推荐(0)
摘要:ServerAdmin m.koobird.com DocumentRoot "/var/www/html/xinyou" ServerName m.romy.com ErrorLog "logs/romy-m.koobird.com-error.log" CustomLog "logs/romy... 阅读全文
posted @ 2015-05-14 09:32 幻星宇 阅读(153) 评论(0) 推荐(0)
摘要:ttpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName解决办法非常简单:#vim /web/apache/conf/httpd.conf (... 阅读全文
posted @ 2015-05-12 22:45 幻星宇 阅读(446) 评论(0) 推荐(0)
摘要:/** * 每天定时执行的sphinx索引增量更新 * @author guo.jing * 2015-05-08 * @param $indexerArr(执行要更新的索引) */ public function updateCoreseekIndex... 阅读全文
posted @ 2015-05-11 10:31 幻星宇 阅读(412) 评论(0) 推荐(0)
摘要:1.在线安装mod_sslyum -y install mod_ssl查看openssl是否安装成功rpm -qa |grep openssl2.建立服务器密钥openssl genrsa -out server.key 10243.建立服务器公钥openssl req -new -key serv... 阅读全文
posted @ 2015-04-03 14:33 幻星宇 阅读(1584) 评论(0) 推荐(0)
摘要:1 $z * sin($t) + 0.006,15 'lng' => $z * cos($t) + 0.0065 16 );17 }18 19 //使用方法 20 $lat = 40.09974;21 $lng = 116.24847;22 $coordinate =... 阅读全文
posted @ 2015-03-06 15:16 幻星宇 阅读(894) 评论(0) 推荐(0)
摘要:现在有很多朋友在使用安装ImageMagick imagick for php了,今天自己也想做但是不知道如何操作,下面我来给大家介绍Centos 安装ImageMagick imagick for php步骤,各位同学可参考。关于什么是ImageMagickImageMagick是一套软件系列,主... 阅读全文
posted @ 2015-02-02 16:18 幻星宇 阅读(6823) 评论(0) 推荐(0)
摘要:系统默认的缓存方式是采用File方式缓存,我们可以在项目配置文件里面定义其他的缓存方式,例如,修改默认的缓存方式为Xcache(当然,你的环境需要支持Xcache)对于File方式缓存下的缓存目录下面因为缓存数据过多而导致存在大量的文件问题,ThinkPHP也给出了解决方案,可以启用哈希子目录缓存的... 阅读全文
posted @ 2014-10-17 10:26 幻星宇 阅读(235) 评论(0) 推荐(0)
摘要:time = $this->microtime_float();require_once("config.db.php");$this->connect($db_config["hostname"], $db_config["username"], $db_config["password"], $... 阅读全文
posted @ 2014-10-13 17:05 幻星宇 阅读(200) 评论(0) 推荐(0)
摘要:例如你的原路径是 http://localhost/test/index.php/index/add那么现在的地址是 http://localhost/test/index/add如何去掉index.php呢?1、httpd.conf配置文件中加载了mod_rewrite.so模块 //在APACH... 阅读全文
posted @ 2014-10-11 20:38 幻星宇 阅读(246) 评论(0) 推荐(0)
摘要:js文件中的内容(ajax.operate.js);(function ($, window) { var _ajaxOperate = window.ajaxOperate || {}; _ajaxOperate.callback = false; _ajaxOperate.de... 阅读全文
posted @ 2014-08-08 16:30 幻星宇 阅读(540) 评论(0) 推荐(0)
摘要:Sphinx--强大的开源全文检索引擎,Coreseek--免费开源的中文全文检索引擎软件版本:coreseek-4.1mmseg-3.2.14autoconf-2.64老版本的coreseek-3.2和mmseg-3.2.13安装过程一样。一、安装前准备编译环境1.1yum安装编译环境和mysql... 阅读全文
posted @ 2014-05-12 11:35 幻星宇 阅读(808) 评论(0) 推荐(0)
摘要:一个文档包含了安装、增量备份、扩展、api调用示例,省去了查找大量文章的时间。搭建coreseek(sphinx+mmseg3)安装[第一步] 先安装mmseg3cd /var/installwget http://www.coreseek.cn/uploads/csft/4.0/coreseek-... 阅读全文
posted @ 2014-05-12 11:34 幻星宇 阅读(988) 评论(0) 推荐(0)
摘要:我得是centos 6.3,如果直接用yum安装redis,报错,如下:[root@CentOS6 etc]# yum install redisLoaded plugins: fastestmirrorLoading mirror speeds from cached hostfile* base... 阅读全文
posted @ 2014-05-08 16:15 幻星宇 阅读(356) 评论(0) 推荐(0)
摘要:一、封装weixin.class.php由于微信公众平台的通信使用的是特定格式的XML数据,每次接受和回复都要去做一大堆的数据处理。我们就考虑在这个基础上做一次封装,weixin.class.php,代码如下:token = $token;$this->debug = $debug;} //... 阅读全文
posted @ 2014-05-07 20:24 幻星宇 阅读(2014) 评论(0) 推荐(0)
摘要:一个常见的PHP安全细则发布时间:2012-01-09 10:18:50来源:51cto评论:0点击:9次 【字号:大中小】 PHP本身再老版本有一些问题,比如在 php4.3.10和php5.0.3以前有一些比较严重的bug,所以推荐使用新版。另外,目前闹的轰轰烈烈的SQL Injection也... 阅读全文
posted @ 2014-05-06 15:10 幻星宇 阅读(177) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 ··· 18 下一页