![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
PHP
yy20071313
这个作者很懒,什么都没留下…
展开
-
centos 更新php、设置xdebug
1. 查询当前所安装的php包1、使用命令 rpm -qa|grep 列出需要卸载的软件包rpm -qa|grep php原创 2014-09-04 15:20:04 · 1293 阅读 · 0 评论 -
phpstorm 竖线 打印分割线设置
大家使用 phpstorm 的时候,是不是编辑器 右侧有一条竖线,看着有点烦?nas原创 2014-08-30 22:58:48 · 10942 阅读 · 1 评论 -
Base table or view already exists: 1050 Table 'catalog_product_entity_group_price' already exists
如果在安装magento 导入sample data 后,爆出上述 错误:删除 magento数据库,然后重建一个空的magento数据库, 再次导入sample data原创 2014-12-10 16:34:27 · 1114 阅读 · 0 评论 -
magento missing product img
前台突然不显示产品图片了,怎么办?1. 检查 magento/media 目录的权限,media目录必须具有可写权限,因为magento需要在里面创建cache目录,该目录才是真正被前台显示图片的目录,其他的图片只是作为源文件。原创 2014-12-15 11:00:04 · 291 阅读 · 0 评论 -
centos 无法发送邮件的解决办法
一、主机虽支持mail()函数,却无法发送邮件;先使用以下命令检查是否已安装sendmail:rpm –q sendmail检测结果确实未安装该组件,果断安装:yum install sendmail等待安装完成后去检查了下php.ini配置,里面需要修改相关参数,直接:vi /usr/local/php/etc/php.ini找到 sendmail_path 所在行,转载 2014-12-15 17:19:21 · 1121 阅读 · 0 评论 -
magento 获取magento系统的当前时间
date("Y-m-d H:i:s", Mage::getModel('core/date')->timestamp(time()));原创 2014-12-15 19:59:02 · 864 阅读 · 0 评论 -
magento 强制跳转404
$this->getResponse()->setHeader('HTTP/1.1','404 Not Found'); $this->getResponse()->setHeader('Status','404 File not found'); $this->_forward('defaultNoRoute');原创 2015-02-16 17:02:52 · 827 阅读 · 0 评论 -
discount
$totals = Mage::getSingleton('checkout/session')->getQuote()->getTotals(); if(isset($totals['discount']) && $totals['discount']->getValue()) { $discount = $totals['discount']->getValue(); //Discou原创 2015-03-02 17:57:22 · 376 阅读 · 0 评论 -
magento admin chrome firefox
magento在localhost下使用chrome无法登陆admin,但是firefox可以登陆的解决办法:使用FireFox登陆后台system->web->session cookie management->use http only 设置为 no,保存原创 2015-03-09 13:25:24 · 321 阅读 · 0 评论 -
主机无法访问虚拟机服务器
1. 首先确保,主机虚拟机可以互相ping通,虚拟机能联网,否则,检查虚拟机网络配置2. 可能由于虚拟机防火墙的原因。a. 关闭防火墙service iptables stopb. 开放防火墙80端口:#: iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT#: service iptables save#: servi原创 2015-04-26 15:28:46 · 594 阅读 · 0 评论 -
apache 将html解析为php
在 httpd.conf 中 添加:AddType application/x-httpd-php .html .php .htm原创 2015-07-09 16:30:11 · 650 阅读 · 0 评论 -
开启后台template block hint
在phpadmin中运行INSERT INTO `core_config_data` (`scope`, `scope_id`, `path`, `value`) VALUES ('websites', '0', 'dev/debug/template_hints', '1');原创 2015-01-30 00:57:43 · 337 阅读 · 0 评论 -
centos 无法访问apache下的网站
由于重新配置服务器环境,安装完lamp后,从外部访问网站居然一片空白!几经检查,发现是 防火墙的问题1. 查看iptables是否允许httpd通过:$cat /etc/sysconfig/iptables输出如下信息:# Generated by iptables-save v1.4.7 on Mon Dec 1 22:26:22 2014*filter:INPUT原创 2014-12-02 14:38:54 · 439 阅读 · 0 评论 -
yum 常用参数
yum(全称为 Yellow dog Updater, Modified)是一个在Fedora和RedHat以及SUSE中的Shell前端软件包管理器。基於RPM包管理,能够从指定的服务器自动下载RPM包并且安装,可以自动处理依赖性关系,并且一次安装所有依赖的软体包,无须繁琐地一次次下载、安装。yum提供了查找、安装、删除某一个、一组甚至全部软件包的命令,而且命令简洁而又好记。yum的命令转载 2014-09-04 19:40:21 · 375 阅读 · 0 评论 -
magento block和reference
1. 对于原创 2014-09-05 00:47:31 · 825 阅读 · 0 评论 -
Centos 6.5 php 5.5 安装xml扩展
由于php升级到了php5.5版本,有些扩展都不起作用了,需要重新zhan原创 2014-10-25 17:38:35 · 2125 阅读 · 0 评论 -
How to Solve Magento 500 Internal Server Errors
Many users encounter some weird Magento 500 Internal Server Errors (Error type 500). I will try to list the most common solutions. These errors are not always caused by the same reason. You should try转载 2014-09-30 20:16:36 · 742 阅读 · 0 评论 -
magento 调试
1. Disable CacheSystem > Cache Management > Select All [check-boxes] > Actions = Disable > Submit2. Re-Index AllSystem > Index Management > Select All [check-boxes] > Actions = Reindex Data >转载 2014-10-01 19:25:48 · 306 阅读 · 0 评论 -
magento 11个细节技巧
1.快速格式化商品价格Mage::原创 2014-10-11 04:03:23 · 362 阅读 · 0 评论 -
magento 获取某模块对应的数据库表
$tableName=Mage::getSingleton('core/resource')->getTableName('catalog_product_option');原创 2014-11-20 15:51:30 · 717 阅读 · 0 评论 -
centos 6.4 安装 mcrypt 扩展
$yum install libmcrypt libmcrypt-devel mcrypt mhash$yum install php-mcrypt原创 2014-12-01 05:49:44 · 504 阅读 · 0 评论 -
centos 6.4 安装 apache mysql php
1. 安装 apacheyum -y install httpd2.安装 phpyum -y install php3.安装mysqlyum install mysql mysql-server mysql-devel原创 2014-12-01 05:53:12 · 314 阅读 · 0 评论 -
phpstorm 显示行号
File->settings->IDE settings->Editor->Appearance-> show line numbers原创 2014-12-02 15:21:01 · 748 阅读 · 0 评论 -
centos 安装redis
1. 下载rediscd /usr/local/downloadwget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm2. 导入yum源rpm -Uvh epel-release-6*.rpm rpm --import http://dl.fedoraproject.o原创 2015-07-10 15:53:36 · 255 阅读 · 0 评论 -
magento siege
Laying Siege to Magento: Performance testing your Magento webstoresDecember 6, 2010As I alluded to in my excuses for not posting in ages blog post the other day I am working on a newMage转载 2015-07-13 22:03:07 · 440 阅读 · 0 评论 -
magento local.xml
false原创 2015-09-21 14:03:29 · 319 阅读 · 0 评论 -
php 技术收藏
1 . 请对 POSIX 风格和兼容 Perl 风格两种正则 表达式的主要函数进行类比说明eregpreg_matchereg_replacepreg_replace2 . 请说明在 php .ini 中 safe_mode 开启之后对于 PHP 系统 函数的影响开启之后,主要会转载 2015-09-22 17:31:46 · 274 阅读 · 0 评论 -
phpstorm. and language inject
1. Add comment for functionwhen you have wrote a function in a class, you may want to add comment for this functionAt this time, you can click "alt + enter", to create comment. Please notice t原创 2015-09-23 21:29:16 · 407 阅读 · 0 评论 -
url 大小写
1、域名的大小写应该是完全一样的。但是域名后面的网页地址根据不同的平台有不一样的表现:如果服务器的操作系统是Windows的话,那大小写也是一样的;如果服务器的操作系统是 Unix/Linux 的话, 是严格区分大小写的。大小写不一样。2、uri一般是直接映射到磁盘路径上,windows的磁盘路径不区分大小写,而unix区分。所以架在windows上的网站就不区分大小写,而架在转载 2015-10-31 18:48:23 · 570 阅读 · 0 评论 -
centos install mysql5.7
1.下载和解压mysql数据库[root@iZu1cq0mkakZ mysql-5.7.9]# wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.9-linux-glibc2.5-x86_64.tar.gzs[root@iZu1cq0mkakZ mysql-5.7.9]# tar -xvf原创 2016-01-16 20:34:10 · 443 阅读 · 0 评论 -
phpmyadmin 图片无法显示
编辑phpmyadmin/libraries/Header.class.phpheader( "X-Content-Security-Policy: default-src 'self' " . $captcha_url . $GLOBALS['cfg']['CSPAllow'] . ';' .原创 2016-01-16 23:41:45 · 1611 阅读 · 0 评论 -
centos install php5.6
下载 PHP 源码包# wget http://cn2.php.net/distributions/php-5.6.0.tar.xz# xz -d php-5.6.0.tar.xz# tar xf php-5.6.0.tar -C /usr/local/src/添加 epel 源# rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/原创 2016-01-16 10:34:20 · 483 阅读 · 0 评论 -
phpmyadmin 登录超时
1. 修改php.ini$find / -name "php.ini"/etc/php.ini$vim /etc/php.ini修改session.gc_maxlifetime = 1440002. 修改phpmyadmin 目录下的 config.inc.php$cfg['LoginCookieValidity'] = 144000;原创 2016-01-01 00:06:38 · 341 阅读 · 0 评论 -
linux 添加php和mysql到系统命令
在Linux CentOS系统上安装完php和MySQL后,为了使用方便,需要将php和mysql命令加到系统命令中,如果在没有添加到环境变量之前,执行 “php -v”命令查看当前php版本信息时时,则会提示命令不存在的错误,下面我们详细介绍一下在linux下将php和mysql加入到环境变量中的方法(假 设php和mysql分别安装在/usr/local/webserver/php/和/usr转载 2016-01-16 20:42:08 · 856 阅读 · 0 评论 -
centos 安装magento php缺省模块
linux 对应扩展1. yum install -y ImageMagick.x86_64 ImageMagick-devel.x86_642. yum install -y libxslt.x86_64 libxslt-devel.x86_64编译安装php xsl 模块cd /usr/local/src/ext/xslphpize./configurema原创 2016-01-17 06:17:09 · 782 阅读 · 0 评论 -
magento index.php 404
这几天迁移magento,遇到了一些问题,比如 迁移后 除了首页意外,其他页面全部都是404这个问题的原因就是:需要在 url 中添加 index.php。例如:http://192.168.10.158/magento/apparel.html 这个链接报 404 错误,那么就改成http://192.168.10.158/magento/index.php/apparel.html 于原创 2014-12-01 03:54:19 · 1455 阅读 · 0 评论 -
magento add admin account
1. 创建hash 密码:$vi generatePass.php<?php// test.phpdefine('MAGENTO_ROOT', getcwd());$mageFilename = MAGENTO_ROOT . '/app/Mage.php';include $mageFilename; Mage::app();$pass = 'YOUR_PASS'; // t原创 2015-09-21 16:02:11 · 478 阅读 · 0 评论 -
Xdebug安装与使用
Xdebug安装与使用为什么需要Debugger?很多PHP程序员调试使用echo、print_r()、var_dump()、printf()等,其实对 于有较丰富开发经验的程序员来说这些也已经足够了,他们往往可以在程序执行的过程中,通过输出特定变量的值可以判断程序执行是否正确,甚至效率高低也可以 看出来(当然可能还需要使用一些时间函数)。那么我们为什么原创 2014-06-17 21:16:12 · 509 阅读 · 0 评论 -
Steps to add Custom Tabs to the Product Admin
Magento - Steps to add Custom Tabs to the Product AdminIn this article, we are going to discuss about How to add custom table to the magento product admin. In Magento, it is possible to add转载 2015-08-15 20:05:03 · 316 阅读 · 0 评论 -
magento cms tutorial
Magento CMS Page 语法实例 总结了一下关于 CMS Page 的语法, 方便日后用到查阅 首先我们了解下,处理这些语法的 Class Mage_Core_Model_Email_Template_Filter位置: app/code/core/Mage/Core/Model/Email/Template/Filter.php转载 2015-08-04 14:11:36 · 424 阅读 · 0 评论