自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Terry - 专注外贸B2C

GitHub地址:https://github.com/fancyecommerce

  • 博客(26)
  • 资源 (20)
  • 收藏
  • 关注

原创 How to Cluster Magento, nginx and MySQL on Multiple Servers for High Availability

转载地址:http://www.severalnines.com/blog/how-cluster-magento-nginx-and-mysql-multiple-servers-high-availabilityHow to Cluster Magento, nginx and MySQL on Multiple Servers for High Availabilit

2014-03-28 22:06:29 1787

原创 jquery ajax 传递数组数据

1.把数组str转换成json格式str = '{';for( x in arr){ str += '"'+x+'"'+':"'+arr[x]+'",';}str += "}";2.ajax:jQuery.ajax({ async:false, timeout: 80000, dataType: 'json', type:'g

2014-03-26 11:36:57 936

转载 php处理字符串格式的计算公式

php处理字符串格式的计算公式转载地址:http://www.cnblogs.com/qixing/archive/2013/01/25/2876683.html有时候我们对每一种产品都有一个提成公式,而这个计算提成的公式是以字符串格式存在表中的当我们用这个计算公式时,他并不像我们写的:$a=2+3*5;这样简单的能计算出结果,而它是个字符串所以,我们就必须把字符串转化为我们能

2014-03-25 17:09:02 873

原创 jQuery live 重复绑定,导致多次执行的解决方式

一$.fn.live 重复绑定解决:使用die()方法,在live()方法绑定前,将此元素上的前面被绑定的事件统统解除,然后再通过live()方法绑定新的事件。//先通过die()方法解除,再通过live()绑定$(“#selectAll”).die().live(“click”,function(){//事件运行代码});

2014-03-21 15:44:57 2858 1

原创 magento 底部footer部分setemplate 无效的解决方式

Hello Here is how I usually do it when I have the same issue. I change the cache key for the footer to make 2 different cache files, depending on the page. Fist of all add a new property to the foo

2014-03-21 12:14:23 891

原创 Linux RPM的使用

RPM的使用、rpm1安装软件rpmrpm -ivh pageage_name强制安装参数:--nodeps :以依赖关系导致无法安装而进行的强制安装--replacefiles:在安装过程中出现某个文件已经被安装的信息,而进行的文件覆盖。--replacepkgs:覆盖文件夹--force 上面2个的综合体--test:检测依赖性关系,而不安装。--justdb:由于RP

2014-03-21 08:23:29 570

转载 JQuery在光标位置插入内容的实现代码

转载地址:http://www.jb51.net/article/23926.htm(function($){ $.fn.extend({ insertAtCaret: function(myValue){ var $t=$(this)[0]; if (document.selection) { this.focus(); sel = document.selection.crea

2014-03-20 11:25:20 716

原创 手动13 magento cdn加速插件

http://www.magentocommerce.com/magento-connect/One+Pica/extension/1279/one-pica-image-cdn

2014-03-14 16:08:05 1578

原创 手动12 - 安装php加速器 Zend OPcache

php 5.4wget http://pecl.php.net/get/zendopcache-7.0.2.tgztar xzf zendopcache-7.0.2.tgzcd zendopcache-7.0.2phpize./configuremakemake installphp5.5已经内置,直接配置就行zend_extension=/usr/local/li

2014-03-14 16:02:32 1072

原创 php加速器 - zendopcache

php 5.4wget http://pecl.php.net/get/zendopcache-7.0.2.tgztar xzf zendopcache-7.0.2.tgzcd zendopcache-7.0.2phpize./configuremakemake installphp5.5已经内置,直接配置就行zend_extension=/usr/local/lib/

2014-03-14 15:57:18 871

转载 手动11 -nginx 优化配置

一、一般来说nginx 配置文件中对优化比较有作用的为以下几项:1.  worker_processes 8;nginx 进程数,建议按照cpu 数目来指定,一般为它的倍数 (如,2个四核的cpu计为8)。2.  worker_cpu_affinity 00000001 00000010 00000100 00001000 00010000 00100000 01000000 1000000

2014-03-14 14:15:59 620

原创 清除文件中的.svn文件

在要 清除文件的根目录下新建文件:kill-svn.bat,内容为@echo on@rem 删除SVN版本控制目录@rem for /r . %%a in (.) do @if exist "%%a\.svn" @echo "%%a\.svn"@for /r . %%a in (.) do @if exist "%%a\.svn" rd /s /q "%%a\.svn"@ec

2014-03-12 17:59:44 567

原创 Linux常用命令

1查看imagedirbyurl文件夹的磁盘使用量:du -h --max-depth=1 imagedirbyurl/2添加cron:*/1 * * * * /usr/local/php/bin/php /www/web/cron.php >>/www/web_logs/cron.txt 2>&1 &3查看linux总体:top4 重启nginx 重启

2014-03-12 14:33:03 778

原创 magento - 使用后台设置的时间用法

Mage::getModel('core/date')->date('Y-m-d H:i:s');

2014-03-12 12:01:27 1116

原创 图片抓取出错

查看/media/imagedirbyurl的文件权限是否为777cron是否配置

2014-03-11 15:59:50 561

转载 手动10 -Linux查看CPU和内存使用情况

在系统维护的过程中,随时可能有需要查看 CPU 使用率,并根据相应信息分析系统状况的需要。在 CentOS 中,可以通过 top 命令来查看 CPU 使用状况。运行 top 命令后,CPU 使用状态会以全屏的方式显示,并且会处在对话的模式 -- 用基于 top 的命令,可以控制显示方式等等。退出 top 的命令为 q (在 top 运行中敲 q 键一次)。  操作实例:   在命令行中

2014-03-11 09:47:00 663

原创 手动9 - 安装vsftpd

什么是vsftpdvsftpd是一款在Linux发行版中最受推崇的FTP服务器程序。特点是小巧轻快,安全易用。vsftpd 的名字代表”very secure FTP daemon”, 安全是它的开发者 Chris Evans 考虑的首要问题之一。在这个 FTP 服务器设计开发的最开始的时候,高安全性就是一个目标。安装vsftpd1、以管理员(root)身份执行以下命令

2014-03-11 09:42:18 829

原创 手动7 - nginx 日志切割

1设置日志格式及路径:全局格式设置 :nginx.conflog_format  wwwlogs  '$remote_addr - $remote_user [$time_local] $request $status $body_bytes_sent $http_referer $http_user_agent $http_x_forwarded_for'; access

2014-03-11 09:01:48 785

原创 手动6 - 隐藏Nginx版本号

一、隐藏Nginx版本号第一步: vi /usr/local/nginx/conf/nginx.conf在http{}中加入 server_tokens off;第二歩: vi /usr/local/nginx/conf/fastcgi_params将里面的 fastcgi_param SERVER_SOFTWARE nginx/$nginx_ver

2014-03-11 08:28:21 621

原创 手动5:开机自启动

1开机启动将此命令加入到rc.local文件中,这样开机的时候nginx就默认启动了vi /etc/rc.local加入一行 /etc/init.d/nginx start 保存并退出,下次重启会生效。2nginx 启动脚本:vi /etc/init.d/nginx (输入下面的代码) #!/bin/bash# nginx Startup scr

2014-03-10 21:26:59 871

原创 mysql - 数据库自动备份脚本

mkdir /backupvim /backup/mysql_backup.sh内容为#!/bin/bashdate=$(date +%Y%m%d)/usr/local/mysql/bin/mysqldump -h localhost -uroot -p'D2#2$#@d2s433egf%$^&s' erp > /backup/databases-$date.sql

2014-03-10 17:16:38 530

原创 magento中加入第三方php文件库

$ExternalLibPath=Mage::getModuleDir('', 'Zqy_Createproduct') . DS . 'lib' . DS .'simple_html_dom.php';require_once ($ExternalLibPath);在Createproduct里面新建文件lib/simple_html_dom.php

2014-03-09 21:10:54 916

原创 抓取1688产品的代码

<?php$f_url = "http://detail.1688.com/offer/36618237146.html";$url = "http://127.0.0.1/test/dom/x.php?url=".$f_url;require("simple_html_dom.php");//echo file_get_contents("http://www.taobao.com")

2014-03-07 19:43:56 7256 6

原创 sql的方式修改产品属性 - 避免使用event (magento)

//保存产品的is_edit属性    private function updateAttribute($id,$values,$attribute,$tablename){                $connection        = $this->getConnection('core_write');                $newvalues

2014-03-06 10:02:47 693

转载 系统商品SKU构成

http://wenku.baidu.com/link?url=qWJCcMAIwe82_X2_Rd-dzFRrGVs8lxlSR5jCctc_pB27r-8yfVXOL8NBiNhNeZi-vZ5_FGSngaJoV51oIQix779LPkMVDt-a1JJHaN4eO-_&qq-pf-to=pcqq.c2c

2014-03-04 17:48:21 1550

原创 宽屏模板做法 - 自适应页面

宽屏模板:1.对于中间部分的缩放,使用js控制,代码如下:用于的情况:当宽度缩放的时候,增加或者减少产品个数 jqSmartCatalog(window).load(function() { jqSmartCatalog('div.smart-columns-light').wpSmartColumns({columnWidth: 200, addLis

2014-03-04 10:30:29 968

magento -redis 插件安装包

magento -redis 安装包

2014-10-20

redis magento

redis magento

2014-07-30

nagios下载的文件安装包

nagios下载的文件安装包

2014-07-21

nagios下载包

nagios下载包

2014-07-21

客客英文语言包

客客英文语言包

2014-07-01

magento footer no cache,不缓存页面底部footer部分

magento footer no cache,不缓存页面底部footer部分

2014-03-25

varnish已经修补1.8bug

varnish已经修补1.8bug

2014-02-28

magento环境检测

magento环境检测

2014-02-28

nginx和php和varnish配置

nginx和php和varnish配置

2014-02-28

php版本为:559

php-5-5-9  php版本为:559

2014-02-28

libmcrypt-2.5.7.tar.gz

libmcrypt-2.5.7.tar.gz

2014-02-28

mysql资源5-6

mysql-5.6.14.tar

2014-02-28

varnish-magento

varnish-magento

2014-02-28

linux-varnish配置

linux-varnish配置

2014-02-27

nginx_php_magento配置文件

nginx_php_magento配置文件

2014-02-27

nginx配置文件-magent

nginx配置文件-magent

2014-02-26

gvim资源,windows

gvim资源,windows

2014-01-11

ASchroder_SMTPPro

ASchroder_SMTPPro

2013-12-28

magento+redis下载

magento+redis的下载文件,magento+redis的下载文件

2013-12-27

bacula的配置文件

bacula的配置文件

2013-12-18

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除