摘要: Apache的2中工作方式:1.prefork模式 次多路处理模块(MPM)实现了一个非线程型的,预派生的web服务器。它适合于没有线程安全库,需要避免线程兼容性问题的系统,它是要求将每个请求都独立处理的最好的MPM,这样若一个请求出现问题就不会影响到其他的请求。 这个MPM有 很强的自我调节能... 阅读全文
posted @ 2015-04-13 13:27 520php 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 问题描述:在linux中的直接执行shell脚本可以用相对路径找到文件,但是如果通过计划任务crontab执行shell脚本时,却不能通过相对路径找到文件!例子: shell脚本文件代码~#! /bin/shLogfile = './1.txt';date >> $Logfile;echo '---... 阅读全文
posted @ 2015-04-13 11:21 520php 阅读(2573) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2015-04-07 11:33 520php 阅读(310) 评论(0) 推荐(0) 编辑
摘要: 200代表访问成功301 代表永久性转移302 代表临时性转移400 代表访问无效401 代表未授权403 代表禁止访问404 代表未找到文件 301和302的区别对于用户 301,302对用户来说没有区别,他们看到效果只是一个跳转,浏览器中旧的URL变成了新的URL。页面跳到了这个新的ur... 阅读全文
posted @ 2015-04-02 14:57 520php 阅读(1356) 评论(0) 推荐(0) 编辑
摘要: 测试php代码的运行时间stime = microtime(true); } public function start(){ $this->stime = microtime(true); } ... 阅读全文
posted @ 2015-04-02 14:08 520php 阅读(585) 评论(0) 推荐(0) 编辑
摘要: 安装php扩展pho_mysql错误信息: checking for mysql_config... not found configure: error: Unable to find your mysql installation解决方法: 这个错误是由于在编译的时候指定了 ‘ --with-p... 阅读全文
posted @ 2015-04-02 13:50 520php 阅读(570) 评论(0) 推荐(0) 编辑
摘要: PHP求某一天,上周,上月等等的方式上一周的时间:date('Y-m-d',strtotime('-1 week'));上周五(上周几):dete('Y-m-d',strtotime('-1 Friday'));某一天的前一天:date('Y-m-d',strtotime('-1 day 2014-... 阅读全文
posted @ 2015-04-02 13:46 520php 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 借用多字节字符串函数function my_reverse($str=null){ $encode = mb_detect_encoding($str); for($i = 0 ; $i < mb_strlen($str,$encode) ; $i++) { ... 阅读全文
posted @ 2015-04-02 13:24 520php 阅读(284) 评论(0) 推荐(0) 编辑