<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jun Blog &#187; php</title>
	<atom:link href="http://www.junstudio.cn/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.junstudio.cn</link>
	<description>致力于网站重构</description>
	<lastBuildDate>Thu, 29 Jul 2010 14:47:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>[转]开始EditPlus的自动完成</title>
		<link>http://www.junstudio.cn/2010/07/editplus-auto-complate/</link>
		<comments>http://www.junstudio.cn/2010/07/editplus-auto-complate/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 14:47:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.junstudio.cn/?p=789</guid>
		<description><![CDATA[一直用着DW写样式，其实还算不错，就是启动太慢，软件越做越大，用到的功能是越来越少了。 长期以来，一直想找个可以替换的编辑器，试用过TOPSTYLE，结果还是不习惯。 以前曾经尝试过用EDITPLUS来写代码，可惜被DW养成的坏习惯，纯手写代码实在写不下去，效率太差了……。前两天忽然在群里看到有人在讨论 EDITPLUS，说起EDITPLUS配置自动完成的书写效率多高，自己也心痒痒，在网上先随便DOWN了个自动完成的模版，然后再把按自己的习惯进行 了修改，试用了几天，感觉还是满爽的，终于可以抛弃DW了。 大家可以到www.editplus.com下载各种自动完成文件，文件下载后是.acp后缀的，把文件放到Editplus的安装目录下，打开 Editplus》工具》首选项》文件》设置和语法，文件类型选中对应的CSS，在“自动完成”里选择刚才放到安装目录下的.acp文件，确定就完成啦。 正确配置之后，例：只要输入“oh”，然后再按空格，就出来“overflow:hidden;”了。 其实这个功能要叫“自动替换”比较好理解。 大家可以先把下载的自动完成文件，按自己习惯进行修改： “#T＝”后面的内容是你在EP中输入的字母，再按空格的时候，下面的第二行以下（直到碰到下一个“#T＝”）的内容就会自动完成 “^!”是自动完成后，鼠标当前位置 我的对照表-080826 #T=* * html ^!{height:100px;} #T=z ^! {} #T=x #^! {} #T=c .^! {} #T=fl float:left; #T=fr float:right; #T=fn float:none; #T=cb clear:both; #T=db display:block; #T=dt display:table; #T=di display:inline; #T=dn display:none; #T=o overflow:^!; #T=oh overflow:hidden; #T=oa overflow:auto; #T=os overflow:scroll; #T=ov overflow:visible; #T=por position:relative; #T=poa [...]]]></description>
		<wfw:commentRss>http://www.junstudio.cn/2010/07/editplus-auto-complate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>去除ckeditor里烦人的拼写检查</title>
		<link>http://www.junstudio.cn/2010/06/remove-sutostartup-from-ckeditor/</link>
		<comments>http://www.junstudio.cn/2010/06/remove-sutostartup-from-ckeditor/#comments</comments>
		<pubDate>Wed, 30 Jun 2010 15:10:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.junstudio.cn/?p=783</guid>
		<description><![CDATA[其实很简单 打开config.js文档 CKEDITOR.editorConfig = function( config ) { config.scayt_autoStartup = false; //增加这一项即可 };]]></description>
		<wfw:commentRss>http://www.junstudio.cn/2010/06/remove-sutostartup-from-ckeditor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>关于wp安装插件出现Parse error: parse error的问题</title>
		<link>http://www.junstudio.cn/2010/03/wordpress-parse-error/</link>
		<comments>http://www.junstudio.cn/2010/03/wordpress-parse-error/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 10:21:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.junstudio.cn/?p=752</guid>
		<description><![CDATA[我本机的PHP环境是wamp的,今天出现 Parse error: parse error的问题郁闷了好久,最后还是google强大, 原来是wamp没有开short_open_tags]]></description>
		<wfw:commentRss>http://www.junstudio.cn/2010/03/wordpress-parse-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend_Db数据库知识</title>
		<link>http://www.junstudio.cn/2010/01/zend-db/</link>
		<comments>http://www.junstudio.cn/2010/01/zend-db/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 12:47:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://www.junstudio.cn/?p=711</guid>
		<description><![CDATA[例子： Model文件: $this-&#62;fetchAll(&#8220;is_jian=1&#8243;,&#8221;id DESC&#8221;,0,2)-&#62;toArray();//根据is_jian=1，按id倒序排列取前2条记录当第一个参数为null时，则直接按id倒序排列ASC为正序。 路由文件： $video=new Video();//实例化数据库类 $this-&#62;view-&#62;get2Video =$video-&#62;get2Video();//取到2条首页推荐的数据 index.phtml文件： &#60;?php foreach ($this-&#62;get2Video as $video): ?&#62; &#60;?=$video['id']; ?&#62; &#60;?=$video['name']; ?&#62; &#60;? endforeach; ?&#62; 添加引号防止数据库攻击 quote用法 $value = $db-&#62;quote(&#8216;St John&#8221;s Wort&#8217;); // $value 现在变成了 &#8216;&#8221;St John\&#8221;s Wort&#8221;&#8216; (注意两边的引号) // 为数组加引号 $value = $db-&#62;quote(array(&#8216;a&#8217;, &#8216;b&#8217;, &#8216;c&#8217;)); // $value 现在变成了 &#8216;&#8221;a&#8221;, &#8220;b&#8221;, &#8220;c&#8221;&#8216; (&#8220;,&#8221;分隔的字符串) quoteInto用法 echo $where = [...]]]></description>
		<wfw:commentRss>http://www.junstudio.cn/2010/01/zend-db/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Magento的EAV模型窥探</title>
		<link>http://www.junstudio.cn/2009/12/magento-eav/</link>
		<comments>http://www.junstudio.cn/2009/12/magento-eav/#comments</comments>
		<pubDate>Sat, 05 Dec 2009 08:38:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[magento]]></category>

		<guid isPermaLink="false">http://www.junstudio.cn/?p=699</guid>
		<description><![CDATA[EAV ： Entity &#8211; Attribute &#8211; Value 的缩写，是数据库模型的一种，使用eav建模的好处是可以动态为数据模型增加或移除属性。 1. 问题提出: 假设需要定义一个实体Customer的信息，通常我们只要定义一个表为customer，并定义相应的属性即可。倘若某天需要为customer增加一个新的属性如“毕业学校”，那么就需要更改表的结构。 如果使用EAV模型则不必改变表结构。 2. Magento的EAV模型定义: 在Magento中，EAV模型相关的表定义有： 1234567891011121314eav_attribute eav_attribute_group eav_attribute_option eav_attribute_option_value eav_attribute_set eav_entity eav_entity_attribute eav_entity_datetime eav_entity_decimal eav_entity_int eav_entity_store eav_entity_text eav_entity_type eav_entity_varchar 现在让我来观察最重要的三张表 eav_entity_type，eav_entity_attribute，eav_attribute 1) eav_entity_type表用来定义实体的基本信息。 12345mysql&#38;gt; select * from &#160;eav_entity_type where entity_type_id=1; +----------------+------------------+-------------------+-----------------+-----------------+ &#124; entity_type_id &#124; entity_type_code &#124; entity_model      &#124; attribute_model &#124; entity_table &#124; +----------------+------------------+-------------------+-----------------+-----------------+ &#124; &#160; [...]]]></description>
		<wfw:commentRss>http://www.junstudio.cn/2009/12/magento-eav/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>magento目录结构</title>
		<link>http://www.junstudio.cn/2009/11/magento-directory-structure/</link>
		<comments>http://www.junstudio.cn/2009/11/magento-directory-structure/#comments</comments>
		<pubDate>Fri, 27 Nov 2009 05:06:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[magento]]></category>

		<guid isPermaLink="false">http://www.junstudio.cn/?p=685</guid>
		<description><![CDATA[/app &#8211; 程序根目录 /app/etc &#8211; 全局配置文件目录 /app/code &#8211; 所有模块安装其模型和控制器的目录 /app/code/core &#8211; 核心代码或经过认证得模块，如果要升级不要这里的代码 /app/code/community &#8211; 社区版的模块目录 /app/code/local &#8211; 定制代码目录 /app/code/core/Mage? &#8211; magento默认命名空间 /app/code/core/Mage?/{Module} &#8211; 模块根目录 /app/code/core/Mage?/{Module}/etc &#8211; 模块的配置文件目录 /app/code/core/Mage?/{Module}/controllers &#8211; 模块的控制器 /app/code/core/Mage?/{Module}/Block? &#8211; 显示块的逻辑类 /app/code/core/Mage?/{Module}/Model? &#8211; 模块的对象模型 /app/code/core/Mage?/{Module}/Model/Mysql4? &#8211; 模块的资源模型 /app/code/core/Mage?/{Module}/sql &#8211; 模块各个版本的安装和升级用sql /app/code/core/Mage?/{Module}/sql/{resource}/- 升级是需要的资源模型 /app/code/core/Mage?/{Module}/sql/{resource}/{type}-{action}-{versions}.(sql&#124;php) &#8211; 资源升级文件 例如: mysql4-upgrade-0.6.23-0.6.25.sql /app/design &#8211; 设计包目录 (layouts, templates, translations) [...]]]></description>
		<wfw:commentRss>http://www.junstudio.cn/2009/11/magento-directory-structure/feed/</wfw:commentRss>
		<slash:comments>1805</slash:comments>
		</item>
		<item>
		<title>WAMP上配置域名</title>
		<link>http://www.junstudio.cn/2009/11/add-domain-on-wamp/</link>
		<comments>http://www.junstudio.cn/2009/11/add-domain-on-wamp/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 07:27:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[wamp]]></category>

		<guid isPermaLink="false">http://www.junstudio.cn/?p=681</guid>
		<description><![CDATA[打开D:\wamp\bin\apache\Apache2.2.11\conf\httpd.conf文件，去掉vhost的前面的注释修改成如下 12# Virtual hosts Include conf/extra/httpd-vhosts.conf 然后配置 12345678910111213141516171819&#60;Directory D:/wamp/www&#62; Order Deny,Allow Allow from all Options All AllowOverride All &#60;/Directory&#62; &#60;Directory E:/wwwroot&#62; Order Deny,Allow Allow from all Options All AllowOverride All &#60;/Directory&#62; &#160; &#60;VirtualHost *:80&#62; &#160; &#160; ServerAdmin webmaster@junstudio.cn &#160; &#160; DocumentRoot &#34;E:/wwwroot/junstudio.cn&#34; &#160; &#160; ServerName www.junstudio.cn &#60;/VirtualHost&#62; 这里要注意的是如果你的目录放在其他盘里一定要设置目录的权限 最后配置下你的host文件,增加一行 1127.0.0.0 &#160; &#160; junstudio.cn]]></description>
		<wfw:commentRss>http://www.junstudio.cn/2009/11/add-domain-on-wamp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>在magento里使用jQuery</title>
		<link>http://www.junstudio.cn/2009/10/use-jquery-in-magento/</link>
		<comments>http://www.junstudio.cn/2009/10/use-jquery-in-magento/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 02:08:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[magento]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[prototype]]></category>

		<guid isPermaLink="false">http://www.junstudio.cn/?p=674</guid>
		<description><![CDATA[打开magento的/app/design/frontend/default/default/layout/page.xml的配置可以看出,magento是使用prototype作为核心的js库的，再加上jQuery无疑会出现冲突.下面这个方法可以有效解决这个问题. 第一步：去下载一个1.2.3版本jquery文件，也就是jquery-1.2.3.min.js，为什么是1.2.3，因为我用了几次高版本的都不起作用，怀疑是否是版本兼容的问题，在代码最后增加 jQuery.noConflict(); 12&#125;&#41;;&#125;&#41;&#40;&#41;; jQuery.noConflict&#40;&#41;;//这行 修改完毕上传至js目录里我是放在了/js/jquery/下面 第二步：调用该脚本，打开/app/design/frontend/default/default/layout/page.xml，大约37行左右 123456&#60;script type=&#34;text/javascript&#34;&#62;// &#60;![CDATA[ jquery/jquery-1.2.3.min.js // ]]&#62;&#60;/script&#62; &#60;!--增加这行--&#62; &#60;script type=&#34;text/javascript&#34;&#62;// &#60;![CDATA[ prototype/prototype.js // ]]&#62;&#60;/script&#62; 最后一步，就是如何使用了 方法一 123456&#160; jQuery&#40;document&#41;.ready&#40;function&#40;$&#41;&#123; // jQuery使用$(...) $&#40;'div'&#41;.show&#40;&#41;; &#125;&#41;; // Prototyp使用 $(...) $&#40;'id'&#41;.hide&#40;&#41;; 方法二 123456jQuery&#40;document&#41;.ready&#40;function&#40;&#41;&#123; // Prototyp使用$(...) $&#40;'id'&#41;.hide&#40;&#41;; // jQuery使用jQuery(...) jQuery&#40;'div'&#41;.show&#40;&#41;; &#125;&#41;; 官方有个整合jquery的插件 http://www.magentocommerce.com/extension/1619/mxperts&#8211;jquery-base]]></description>
		<wfw:commentRss>http://www.junstudio.cn/2009/10/use-jquery-in-magento/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>magento之定制产品特价页面</title>
		<link>http://www.junstudio.cn/2009/10/custom-special-price-page-in-magento/</link>
		<comments>http://www.junstudio.cn/2009/10/custom-special-price-page-in-magento/#comments</comments>
		<pubDate>Sat, 17 Oct 2009 06:58:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[magento]]></category>
		<category><![CDATA[magento block]]></category>
		<category><![CDATA[magento custom]]></category>
		<category><![CDATA[magento special price]]></category>

		<guid isPermaLink="false">http://www.junstudio.cn/?p=622</guid>
		<description><![CDATA[一般情况下，我们都需要有个页面来专门显示所有特价商品的页面，下面介绍一种使用magento自带的“catalog/product/list.phtml”模板来显示特价商品的方法,也是目前最好的一个方法了: 第一步:建立Block文件/app/code/local/Mage/Catalog/Block/Product/Special.php ，具体代码如下: 123456789101112131415161718192021222324252627282930class Mage_Catalog_Block_Product_Special extends Mage_Catalog_Block_Product_List &#123; /** * Retrieve loaded category collection * * @return Mage_Eav_Model_Entity_Collection_Abstract */ protected function _getProductCollection&#40;&#41; &#123; $todayDate = date&#40;'m/d/y'&#41;; $tomorrow = mktime&#40;0, 0, 0, date&#40;'m'&#41;, date&#40;'d'&#41;+1, date&#40;'y'&#41;&#41;; $tomorrowDate = date&#40;'m/d/y', $tomorrow&#41;; $collection = Mage::getResourceModel&#40;'catalogsearch/advanced_collection'&#41; -&#38;gt;addAttributeToSelect&#40;Mage::getSingleton&#40;'catalog/config'&#41;-&#38;gt;getProductAttributes&#40;&#41;&#41; -&#38;gt;addMinimalPrice&#40;&#41; -&#38;gt;addStoreFilter&#40;&#41;; Mage::getSingleton&#40;'catalog/product_status'&#41;-&#38;gt;addVisibleFilterToCollection&#40;$collection&#41;; Mage::getSingleton&#40;'catalog/product_visibility'&#41;-&#38;gt;addVisibleInSearchFilterToCollection&#40;$collection&#41;; $collection-&#38;gt;addAttributeToFilter&#40;'special_from_date', array&#40;'date' =&#38;gt; true, 'to' =&#38;gt; $todayDate&#41;&#41; -&#38;gt;addAttributeToFilter&#40;'special_to_date', array&#40;'or'=&#38;gt; [...]]]></description>
		<wfw:commentRss>http://www.junstudio.cn/2009/10/custom-special-price-page-in-magento/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>magento之Block的应用</title>
		<link>http://www.junstudio.cn/2009/10/magento-block/</link>
		<comments>http://www.junstudio.cn/2009/10/magento-block/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 13:32:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[magento]]></category>
		<category><![CDATA[magento block]]></category>

		<guid isPermaLink="false">http://www.junstudio.cn/?p=610</guid>
		<description><![CDATA[这个需求太现实了。magento是很灵活，好多的功能分割成一个个小块（block，其它的框架中也有类似概念，如seagull php框架，但是没magento灵活），比如购物篮，货币切换器，语言切换器，newsletter&#8230;不同的客户肯定会有不同的要求，这就需要对这些 block的位置做调整。 magento是通过theme下面的layout文件对这些block 定位的，所以我们需要做的是根据magento的layout语法来修改这些xml文件。 比如我们要将product compare block（产品比较）显示在左栏第一个，当然我的布局中包含了左栏。我只需要给prodct compare block添加一个 before=&#8217;-&#8217; 参数即可，如下所示 123&#60;reference name = &#34;left&#34; &#62; &#160; &#160;&#60;block type = &#34;core/template&#34; before = &#34;-&#34; name = &#34;catalog.compare.sidebar&#34; template = &#34;catalog/product/compare/sidebar.phtml&#34; /&#62; &#60;/reference &#62; 简单解释下相关的参数 before=&#8221;-&#8221; 作为第一个block，当有多个block指定该参数值时，后出现的优先 after=&#8221;-&#8221; 作为最后一个block before=&#8221;block_name&#8221; 显示在block_name 前 面 after=&#8221;block_name&#8221;显示在block_name 后 面]]></description>
		<wfw:commentRss>http://www.junstudio.cn/2009/10/magento-block/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend Framework自定义路由一则</title>
		<link>http://www.junstudio.cn/2009/04/zend-framework%e8%87%aa%e5%ae%9a%e4%b9%89%e8%b7%af%e7%94%b1%e4%b8%80%e5%88%99/</link>
		<comments>http://www.junstudio.cn/2009/04/zend-framework%e8%87%aa%e5%ae%9a%e4%b9%89%e8%b7%af%e7%94%b1%e4%b8%80%e5%88%99/#comments</comments>
		<pubDate>Thu, 30 Apr 2009 10:21:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://www.junstudio.cn/?p=512</guid>
		<description><![CDATA[经常性的看到如下的url: http://www.junstudio.cn/id/4 或者更干脆 http://www.junstudio.cn/3 链接清爽,且搜索引擎友好. ZF为我们提供了快速简单的实现方式,代码如下 //$front为前段控制器实例&#160;&#160; $router = $front-&#62;getRouter();&#160;&#160; //实现如http://www.junstudio.cn/id/4类型的url&#160;&#160; $router-&#62;addRoute(&#8216;test1&#8216;,&#160; &#160; &#160; &#160; new&#160;Zend_Controller_Router_Route(&#8216;id/:aid&#8216;,&#160; &#160; &#160; &#160; &#160; &#160; array(&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#8216;controller&#8216;=&#62;&#8216;index&#8216;,&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#8216;action&#8216;=&#62;&#8216;view&#8216;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;&#160; &#160; &#160; &#160; &#160; )&#160;&#160; &#160; &#160; [...]]]></description>
		<wfw:commentRss>http://www.junstudio.cn/2009/04/zend-framework%e8%87%aa%e5%ae%9a%e4%b9%89%e8%b7%af%e7%94%b1%e4%b8%80%e5%88%99/feed/</wfw:commentRss>
		<slash:comments>742</slash:comments>
		</item>
		<item>
		<title>echo的简化方法</title>
		<link>http://www.junstudio.cn/2009/04/echo%e7%9a%84%e7%ae%80%e5%8c%96%e6%96%b9%e6%b3%95/</link>
		<comments>http://www.junstudio.cn/2009/04/echo%e7%9a%84%e7%ae%80%e5%8c%96%e6%96%b9%e6%b3%95/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 15:24:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.junstudio.cn/2009/04/echo%e7%9a%84%e7%ae%80%e5%8c%96%e6%96%b9%e6%b3%95/</guid>
		<description><![CDATA[需要php.ini 打开 short_open_tag]]></description>
		<wfw:commentRss>http://www.junstudio.cn/2009/04/echo%e7%9a%84%e7%ae%80%e5%8c%96%e6%96%b9%e6%b3%95/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend Studio for Eclipse 6的自动换行</title>
		<link>http://www.junstudio.cn/2009/03/zend-studio-for-eclipse-6-word-wrap/</link>
		<comments>http://www.junstudio.cn/2009/03/zend-studio-for-eclipse-6-word-wrap/#comments</comments>
		<pubDate>Thu, 26 Mar 2009 14:10:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[word-wrap]]></category>
		<category><![CDATA[zend]]></category>

		<guid isPermaLink="false">http://www.junstudio.cn/?p=455</guid>
		<description><![CDATA[1、打开ZS6，Help菜单—Software Updates—Find and Install，如图： 2、选择第二项，下一步： 3、点击“New Remote Site”，在弹出的对话框中按下图填写： URL：http://ahtik.com/eclipse-update 4、OK后下一步，等待片刻后选择对话框中的“WordWrap”，下一步： 5、当然是接受License啦，不接受没法用了，呵呵： 6、确认要装的扩展，继续下一步： 7、点击“Install”或“Install All”都可以，反正只有一项： 8、使用的时候，在代码上点右键，点击“Virtual Word Wrap”即可，如图： 从此，整个代码清净了…… 后记： 记得我们的代码规范中有这么一句话： 80字符折行，在合适的地点折行。 一般原则：逗号后折行。运算符前折行。尽量与前行对齐。]]></description>
		<wfw:commentRss>http://www.junstudio.cn/2009/03/zend-studio-for-eclipse-6-word-wrap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>40条优化PHP代码的小提示</title>
		<link>http://www.junstudio.cn/2008/11/40-optimization-of-php-code-tips/</link>
		<comments>http://www.junstudio.cn/2008/11/40-optimization-of-php-code-tips/#comments</comments>
		<pubDate>Thu, 27 Nov 2008 08:11:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[tip]]></category>

		<guid isPermaLink="false">http://www.junstudio.cn/?p=359</guid>
		<description><![CDATA[1.如果一个方法能被静态，那就声明他为静态的，速度可提高1/4; 2.echo的效率高于print,因为echo没有返回值，print返回一个整型; 3.在循环之前设置循环的最大次数，而非在在循环中; 4.销毁变量去释放内存，特别是大的数组; 5.避免使用像__get, __set, __autoload等魔术方法; 6.requiere_once()比较耗资源; 7.在includes和requires中使用绝对路径，这样在分析路径花的时间更少; 8.如果你需要得到脚本执行时的时间，$_SERVER['REQUSET_TIME']优于time(); 9.能使用字符处理函数的，尽量用他们，因为效率高于正则; 10.str_replace字符替换比正则替换preg_replace快，但strtr比str_replace又快1/4; 11.如果一个函数既能接受数组又能接受简单字符做为参数，例如字符替换，并且参数列表不是太长，可以考虑多用一些简洁的替换语句，一次只替换一个字符，而不是接受数组做为查找和替换参数。大事化小，1+1>2; 12.用@掩盖错误会降低脚本运行速度; 13.$row['id']比$row[id]速度快7倍，建议养成数组键加引号的习惯; 14.错误信息很有用; 15.在循环里别用函数，例如For($x=0; $x < count($array); $x), count()函数在外面先计算; 16.在方法里建立局部变量速度最快，几乎和在方法里调用局部变量一样快; 17.建立一个全局变量要比局部变量要慢2倍; 18.建立一个对象属性（类里面的变量）例如（$this->prop++）比局部变量要慢3倍; 19.建立一个未声明的局部变量要比一个初始化的局部变量慢9-10倍; 20.声明一个未被任何一个函数使用过的全局变量也会使性能降低（和声明相同数量的局部变量一样），PHP可能去检查这个全局变量是否存在; 21.方法的性能和在一个类里面定义的方法的数目没有关系，因为我添加10个或多个方法到测试的类里面（这些方法在测试方法的前后）后性能没什么差异; 22.在子类里方法的性能优于在基类中;教程原地址http://www.97xxoo.org/article/1/2008/20081102218.shtml 23.只调用一个参数并且函数体为空的函数运行花费的时间等于7-8次$localvar++运算，而一个类似的方法（类里的函数）运行等于大约15次$localvar++运算; 24.Surrounding your string by ‘ instead of ” will make things interpret a little faster since php looks for variables inside “…” but not inside [...]]]></description>
		<wfw:commentRss>http://www.junstudio.cn/2008/11/40-optimization-of-php-code-tips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHPMYADMIN简明安装教程</title>
		<link>http://www.junstudio.cn/2008/11/concise-guide-to-install-phpmyadmin/</link>
		<comments>http://www.junstudio.cn/2008/11/concise-guide-to-install-phpmyadmin/#comments</comments>
		<pubDate>Sat, 08 Nov 2008 08:59:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[phpmyadmin]]></category>

		<guid isPermaLink="false">http://www.junstudio.cn/?p=290</guid>
		<description><![CDATA[简单的说，phpmyadmin就是一种mysql的管理工具，安装该工具后，即可以通过web形式直接管理mysql数据，而不需要通过执行系统命令来管理，非常适合对数据库操作命令不熟悉的数据库管理者，下面我就说下怎么安装该工具： 先到网上下载phpmyadmin，再解压到可以访问的web目录下（如果是虚拟空间，可以解压后通过ftp等上传到web目录下），当然您可以修改解压后该文件的名称。 配置config文件 打开libraries下的config.default.php文件，依次找到下面各项，按照说明配置即可： A.访问网址 $cfg['PmaAbsoluteUri'] = &#8221;;这里填写phpmyadmin的访问网址 B.mysql主机信息 $cfg['Servers'][$i]['host'] = &#8216;localhost&#8217;; // MySQL hostname or IP address 填写localhost或mysql所在服务器的ip地址，如果mysql和该phpmyadmin在同一服务器，则按默认localhost $cfg['Servers'][$i]['port'] = &#8221;; // MySQL port &#8211; leave blank for default port mysql端口，如果是默认3306，保留为空即可 C.mysql用户名和密码 $cfg['Servers'][$i]['user'] = &#8216;root&#8217;; // MySQL user 访问phpmyadmin使用的 mysql用户名 fg['Servers'][$i]['password'] = &#8221;; // MySQL password (only needed对应上述mysql用户名的密码 D.认证方法 $cfg['Servers'][$i]['auth_type'] = &#8216;cookie&#8217;; 在此有四种模式可供选择，cookie，http，HTTP，config config方式即输入phpmyadmin的访问网址即可直接进入，无需输入用户名和密码，是不安全的，不推荐使用。 [...]]]></description>
		<wfw:commentRss>http://www.junstudio.cn/2008/11/concise-guide-to-install-phpmyadmin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mysql 的mysqldump的字符集</title>
		<link>http://www.junstudio.cn/2008/11/mysqldump-character-set/</link>
		<comments>http://www.junstudio.cn/2008/11/mysqldump-character-set/#comments</comments>
		<pubDate>Fri, 07 Nov 2008 14:12:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysqldump]]></category>

		<guid isPermaLink="false">http://www.junstudio.cn/?p=289</guid>
		<description><![CDATA[&#8211;add-locks 在每个表导出之前增加LOCK TABLES并且之后UNLOCK TABLE。(为了使得更快地插入到MySQL)。 &#8211;add-drop-table 在每个create语句之前增加一个drop table。 &#8211;allow-keywords 允许创建是关键词的列名字。这由表名前缀于每个列名做到。 -c, &#8211;complete-insert 使用完整的insert语句(用列名字)。 -C, &#8211;compress 如果客户和服务器均支持压缩，压缩两者间所有的信息。 &#8211;delayed 用Insert DELAYED命令插入行。 -e, &#8211;extended-insert 使用全新多行Insert语法。（给出更紧缩并且更快的插入语句） -#, &#8211;debug[=option_string] 跟踪程序的使用(为了调试)。 &#8211;help 显示一条帮助消息并且退出。 LOAD DATA INFILE &#8211;fields-terminated-by=&#8230; &#8211;fields-enclosed-by=&#8230; &#8211;fields-optionally-enclosed-by=&#8230; &#8211;fields-escaped-by=&#8230; &#8211;fields-terminated-by=&#8230; 这些选择与-T选择一起使用，并且有相应的LOAD DATA INFILE子句相同的含义。 LOAD DATA INFILE语法。 -F, &#8211;flush-logs 在开始导出前，洗掉在MySQL服务器中的日志文件。 -f, &#8211;force, 即使我们在一个表导出期间得到一个SQL错误，继续。 -h, &#8211;host=.. 从命名的主机上的MySQL服务器导出数据。缺省主机是localhost。 -l, &#8211;lock-tables. 为开始导出锁定所有表。 -t, &#8211;no-create-info 不写入表创建信息(Create [...]]]></description>
		<wfw:commentRss>http://www.junstudio.cn/2008/11/mysqldump-character-set/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP 图片处理类</title>
		<link>http://www.junstudio.cn/2008/09/php-image-class/</link>
		<comments>http://www.junstudio.cn/2008/09/php-image-class/#comments</comments>
		<pubDate>Tue, 16 Sep 2008 06:29:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[package]]></category>

		<guid isPermaLink="false">http://www.junstudio.cn/?p=209</guid>
		<description><![CDATA[一个网上找来的PHP图片处理类，暂时还没时间仔细研究&#8230; &#60;?php&#160; &#160; /**&#160; &#160; &#160; *@package Image&#160; &#160;&#160; *@use&#160;&#160; 图片处理&#160; &#160; *@author 刘建武&#160;&#160; tianhao86@hotmail.com&#160; &#160; **/&#160; &#160; &#160;&#160; class&#160;Image {&#160; &#160; &#160; &#160; &#160; &#160; public&#160;function __construct() {&#160; &#160; &#160; &#160; &#160; &#160; }&#160; &#160; &#160; &#160; &#160; &#160; &#160;&#160; &#160; &#160; /******************************************************************************&#160; &#160; &#160; &#160; &#160; *函数名称：thumb&#160; &#160; &#160; &#160; &#160; *函数功能：自动生成缩略图函数&#160; &#160; [...]]]></description>
		<wfw:commentRss>http://www.junstudio.cn/2008/09/php-image-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>非常好的目录导航文件php代码</title>
		<link>http://www.junstudio.cn/2008/08/php-code-catalog-navigation/</link>
		<comments>http://www.junstudio.cn/2008/08/php-code-catalog-navigation/#comments</comments>
		<pubDate>Sat, 02 Aug 2008 13:42:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.junstudio.cn/?p=152</guid>
		<description><![CDATA[这个代码虽然短小，但很实用，它可以轻松建立你指定的目录里的指定后缀名文件的超连接，而且可以设定，不会将指定的目录首页导航。 &#60;?php&#160; function&#160;navbar() {&#160; $files = dir(&#34;.&#34;); //指定目录 &#160; $pipe = &#34; &#124; &#34;; //管道符 &#160; //通过以下的循环搜索目录中所有文件 while&#160;($current = $files-&#62;read())&#160; {&#160; &#160; //ignor all files not of htm type. &#160; if&#160;(strpos($current, &#34;php&#34;)!= FALSE) //设定后缀为PHP的文件将被导航 &#160; //忽略自己(如 index.html) &#160; {&#160; if&#160;(strpos($current, &#34;ndex&#34;) == FALSE)&#160; &#160; {&#160; &#160; print&#160;&#34;&#34;; print&#160;$current; print&#160;&#34;&#34;; print&#160;$pipe; &#160; }; }; }; &#160; [...]]]></description>
		<wfw:commentRss>http://www.junstudio.cn/2008/08/php-code-catalog-navigation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FLEAphp学习笔记:表数据操作</title>
		<link>http://www.junstudio.cn/2008/07/fleaphp-study-note-database-work/</link>
		<comments>http://www.junstudio.cn/2008/07/fleaphp-study-note-database-work/#comments</comments>
		<pubDate>Thu, 17 Jul 2008 02:36:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[datebase]]></category>
		<category><![CDATA[FLEAphp]]></category>

		<guid isPermaLink="false">http://www.junstudio.cn/?p=134</guid>
		<description><![CDATA[HAS_MANY 一对多 HAS_MANY 关联表示在一个数据表中的一条记录，被其他数据表的多条记录引用。例如一篇主题被多个评论引用，而一个用户被多个主题和评论引用。 var&#160;$hasMany = array( // 关联用户发布的多个主题 array( &#8216;tableClass&#8216; =&#62; &#8216;Table_Posts&#8216;, &#8216;foreignKey&#8216; =&#62; &#8216;user_id&#8216;, &#8216;mappingName&#8216; =&#62; &#8216;posts&#8216;, ), ); HAS_ONE 一对一 一对一关联是一对多关联的一种特例，就像正方形是矩形的一种特例。 定义一对一关联使用var $hasOne 成员变量，例如： var&#160;$hasOne = array( array( &#8216;tableClass&#8216; =&#62; &#8216;Table_Profiles&#8216;, &#8216;foreignKey&#8216; =&#62; &#8216;user_id&#8216;, &#8216;mappingName&#8216; =&#62; &#8216;profile&#8216;, ), ); BELONGS_TO 从属 从属关联表示一个记录属于另一个记录。 例如一个评论属于一个主题，一个主题属于一个用户。 从属（BELONGS_TO）关联正好和一对多（HAS_MANY）或一对一（HAS_ONE）关联是相反的方向。 MANY_TO_MANY 多对多 var&#160;$manyToMany = array( array( &#8216;tableClass&#8216; =&#62; [...]]]></description>
		<wfw:commentRss>http://www.junstudio.cn/2008/07/fleaphp-study-note-database-work/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP判断上传文件是否是图片</title>
		<link>http://www.junstudio.cn/2008/07/php-estimate-isimage/</link>
		<comments>http://www.junstudio.cn/2008/07/php-estimate-isimage/#comments</comments>
		<pubDate>Mon, 14 Jul 2008 09:18:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[MIME]]></category>
		<category><![CDATA[upload]]></category>
		<category><![CDATA[上传]]></category>

		<guid isPermaLink="false">http://www.junstudio.cn/?p=95</guid>
		<description><![CDATA[项目中刚用到，简单一句，记下来 $isImage = preg_match(&#8216;/^image\//i&#8216;,$fileType)?true:false; 很多朋友在判断文件格式是看文件后缀，但是这个方法很危险，容易被注入病毒。因此正确的方式是检查文件的 MIME 类型。]]></description>
		<wfw:commentRss>http://www.junstudio.cn/2008/07/php-estimate-isimage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP 中$_SERVER的参数和用法说明</title>
		<link>http://www.junstudio.cn/2008/06/php-server-note-parameters/</link>
		<comments>http://www.junstudio.cn/2008/06/php-server-note-parameters/#comments</comments>
		<pubDate>Sat, 28 Jun 2008 02:46:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://www.junstudio.cn/?p=55</guid>
		<description><![CDATA[$_SERVER['PHP_SELF'] #当前正在执行脚本的文件名，与document root相关。 $_SERVER['argv'] #传递给该脚本的参数 $_SERVER['argc'] #包含传递给程序的命令行参数的个数（如果运行在命令行模式）。 $_SERVER['GATEWAY_INTERFACE'] #服务器使用的 CGI 规范的版本。例如，“CGI/1.1 $_SERVER['SERVER_NAME'] #当前运行脚本所在服务器主机的名称 $_SERVER['SERVER_SOFTWARE'] #服务器标识的字串，在响应请求时的头部中给出 $_SERVER['SERVER_PROTOCOL'] #请求页面时通信协议的名称和版本。例如，“HTTP/1.0 $_SERVER['REQUEST_METHOD'] #访问页面时的请求方法。例如：“GET”、“HEAD”，“POST”，“PUT”。 $_SERVER['QUERY_STRING'] #查询(query)的字符串 $_SERVER['DOCUMENT_ROOT'] #当前运行脚本所在的文档根目录。在服务器配置文件中定义 $_SERVER['HTTP_ACCEPT'] #当前请求的 Accept: 头部的内容 $_SERVER['HTTP_ACCEPT_CHARSET'] #当前请求的 Accept-Charset: 头部的内容。例如：“iso-8859-1,*,utf-8 $_SERVER['HTTP_ACCEPT_ENCODING'] #当前请求的 Accept-Encoding: 头部的内容。例如：“gzip $_SERVER['HTTP_ACCEPT_LANGUAGE'] #当前请求的 Accept-Language: 头部的内容。例如：“en $_SERVER['HTTP_CONNECTION'] #当前请求的 Connection: 头部的内容。例如：“Keep-Alive $_SERVER['HTTP_HOST'] #当前请求的 Host: 头部的内容。 $_SERVER['HTTP_REFERER'] #链接到当前页面的前一页面的 URL 地址。 $_SERVER['HTTP_USER_AGENT'] #当前请求的 User_Agent: 头部的内容。 [...]]]></description>
		<wfw:commentRss>http://www.junstudio.cn/2008/06/php-server-note-parameters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>关于APACHE不能显示目录</title>
		<link>http://www.junstudio.cn/2008/06/apache-can-not-see-a-directory/</link>
		<comments>http://www.junstudio.cn/2008/06/apache-can-not-see-a-directory/#comments</comments>
		<pubDate>Wed, 25 Jun 2008 02:21:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[apache]]></category>

		<guid isPermaLink="false">http://www.junstudio.cn/?p=45</guid>
		<description><![CDATA[不知道动了APACHE的什么配置，目录不能显示了，BAIDU一下 只要在httpd.conf 将 &#60;directory /&#62; &#160;&#160; &#160; Options FollowSymLinks &#160;&#160; &#160; AllowOverride None &#160;&#160; &#160; Order deny,allow &#160;&#160; &#160; deny from all &#160;&#160; &#160; Satisfy all &#60;/directory&#62; 中deny from all 换成 allow from al l即可]]></description>
		<wfw:commentRss>http://www.junstudio.cn/2008/06/apache-can-not-see-a-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
