摘要: PHP Warning: date(): It is not safe to rely on the system’s timezone settings[PHP]date.timezone = "America/New_York"extension=memcache.so;;;;;;;;;;;;;;;;;;;; About php.ini ;;;;;;;;;;;;;;;;;;;;; PHP's initialization file, generally called php.ini, is responsible for; configuring many of 阅读全文
posted @ 2013-03-12 17:04 awinlei 阅读(4068) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/haven/archive/2012/10/31/2747583.html此为从服务器拷贝代码到本地,配置本地环境出现330错误:错误 330 (net::ERR_CONTENT_DECODING_FAILED):未知错误。方法1:打开后台控制面板:Configuration->Enable GZip Compression属性值 设为 0;方法2:打开/includes/init_includes/init_gzip.php找到源代码:if ($_GET['main_page'] != FILENAME_DOWNLOAD & 阅读全文
posted @ 2013-03-12 17:01 awinlei 阅读(1406) 评论(0) 推荐(0) 编辑
摘要: http://www.jb51.net/os/RedHat/54975.htmlhttp://www.php.net/manual/zh/memcache.installation.php#if apt-get, rpm, or yum doesn't workcd /usr/src/wget http://pecl.php.net/get/memcache-2.2.4.tgztar -zxvf memcached-2.2.4.tgzcd memcached-2.2.4phpize && ./configure --enable-memcache && 阅读全文
posted @ 2013-03-12 17:00 awinlei 阅读(260) 评论(0) 推荐(0) 编辑
摘要: 用这个加密:base64_encode ( string $data )<?php$str = 'This is an encoded string';echo base64_encode($str);?>用这个解密:base64_decode ( string $data [, bool $strict= false ] )<?php$str = 'VGhpcyBpcyBhbiBlbmNvZGVkIHN0cmluZw==';echo base64_decode($str);?> 阅读全文
posted @ 2013-03-07 10:32 awinlei 阅读(233) 评论(0) 推荐(0) 编辑
摘要: 因为每次用户点击动态链接的时候都会对服务器发送数据查询的要求对于一个访问量可能达百万千万级别的网站来说 这无疑是服务器一个大大的负担所以把动态数据转换成静态html页面就成了节省人力物力的首选因为此前没有相应的经验 刚开始的时候觉得这个技术很神秘但在看了一些例子以后发现并不是那么复杂(不过网上的资料并不是特别详细)经过一个上午加中下午的试验 终于把该做的任务完成了 下面是一些心得和一个简单的例子希望大虾们不要笑话一般来说 用php转换输出html页面有两种办法 引用大虾的文章如下:第一种:利用模板。目前PHP的模板可以说是很多了,有功能强大的smarty,还有简单易用的smarttemplat 阅读全文
posted @ 2013-03-04 16:17 awinlei 阅读(44141) 评论(1) 推荐(0) 编辑
摘要: 数据表内有一个种类字段,把商品分成了N种,我想使用sql语句列出有多少种类,也就是group by 种类 ,但是我想输出时是按种类的多少进行排序,也就是历史类有100个产品 自然类有200个产品 法律类有300个产品那么就输出 法律 300自然 200历史 100select 种类,sum(数量) from 表名 group by 种类 order by sum(数量) desc试试看<?php$sql="SELECT products_id,COUNT(products_id) FROM orders_products GROUP BY products_id ORDER B 阅读全文
posted @ 2013-02-21 15:09 awinlei 阅读(6137) 评论(0) 推荐(0) 编辑
摘要: <?php $name="klsd92***/e4#$%@&!3hd.s0'sd***//23--djw8";echo preg_replace('/[^0-9a-zA-Z|-]/i','',$name);?> 阅读全文
posted @ 2013-02-21 10:29 awinlei 阅读(954) 评论(0) 推荐(0) 编辑
摘要: .category-entry-box { width: 751px; border-top-style: solid; border-top-width: 2px; float: left; position: relative; border-top-color: #2E82D0; border-top: none; height: auto !important;}.category-entry-box ul li div { position: absolute;}.category-entry-box li { width:... 阅读全文
posted @ 2013-02-06 17:17 awinlei 阅读(977) 评论(0) 推荐(0) 编辑
摘要: for i in $(find ./ -name *.gif);do cp -vf $i ./images/;done主要就是使用 for in $ do done的方式。在linux awk的 while、do-while和for语句中允许使用break,continue语句来控制流程走向,也允许使用exit这样的语句来退出。break中断当前正在执行的循环并跳到循环外执行下一条语句。if 是流程选择用法。 awk中,流程控制语句,语法结构,与c语言类型。下面是各个语句用法。一.条件判断语句(if)if(表达式) #if(VariableinArray)语句1else语句2格式中" 阅读全文
posted @ 2013-02-05 17:56 awinlei 阅读(18366) 评论(0) 推荐(0) 编辑
摘要: this,表示当前的上下文对象是一个html对象,可以调用html对象所拥有的属性,方法 $(this),代表的上下文对象是一个jquery的上下文对象,可以调用jquery的方法和属性值。 阅读全文
posted @ 2013-02-04 09:59 awinlei 阅读(194) 评论(0) 推荐(0) 编辑