<?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>FoxLing - 前端开发 &#187; 开发</title>
	<atom:link href="http://foxling.org/category/develop/feed/" rel="self" type="application/rss+xml" />
	<link>http://foxling.org</link>
	<description>我还在寻找方向</description>
	<lastBuildDate>Tue, 10 Apr 2012 16:48:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>CentOS 配置 Apache, PHP, Mysql 开发环境</title>
		<link>http://foxling.org/develop/lamp-centos/</link>
		<comments>http://foxling.org/develop/lamp-centos/#comments</comments>
		<pubDate>Fri, 11 Nov 2011 17:18:49 +0000</pubDate>
		<dc:creator>FoxLing</dc:creator>
				<category><![CDATA[开发]]></category>

		<guid isPermaLink="false">http://foxling.org/?p=749</guid>
		<description><![CDATA[作为一个Linux超级菜鸟来说，偶尔需要配置一下Web开发环境，每次都需要重新查资料，于是稍微记录一下，加深印象，另外也算是一篇笔记，下次不用到处去Google了。 该文章只是用于Web开发的测试环境，性能和安全完全没有认识，如果有人看到，请不要用于生产环境，对任何后果不负任何责任，嘿嘿。 目的 在CentOS上配置用于开发的Web环境，包含Apache, PHP, Mysql。 安装Apache 直接通过yum安装Apache，yum -y install httpd 安装好后，默认情况下， Apache 的配置文件 httpd.conf 文件在 /etc/httpd/conf/httpd.conf 位置，编辑配置文件，修改DocumentRoot、Directory 两处设置为你需要保存网站文件的位置。 安装Mysql 直接通过yum安装Mysql，yum -y install mysql 安装PHP 由于CentOS通过yum安装的PHP为5.1版本，我需要5.2.17版本来保证和线上的运行环境一致，所以自己下载PHP源码进行编译安装。 到 http://php.net 下载对应版本的源码到 /tmp/ 目录并解压。 进入解压后的目录 /tmp/php-5.2.17/ 根据需求配置需要的模块 ./configure --enable-mbstring --with-curl --with-gd --with-mcrypt --with-mysql --with-mysqli --with-apxs2=/usr/sbin/apxs make make install 上面的语句肯定不会执行成功，因为缺少一大堆的依赖文件，configure: error: libpng.(a&#124;so) not found. 当遇到这种提示时，需要安装libpng库，除此之外还需要安装开发包。yum -y install libpng libpng-devel，对于其它的依赖支持也同样处理。 [...]]]></description>
			<content:encoded><![CDATA[<p>作为一个Linux超级菜鸟来说，偶尔需要配置一下Web开发环境，每次都需要重新查资料，于是稍微记录一下，加深印象，另外也算是一篇笔记，下次不用到处去Google了。</p>
<p>该文章只是用于Web开发的测试环境，性能和安全完全没有认识，如果有人看到，请不要用于生产环境，对任何后果不负任何责任，嘿嘿。</p>
<h3>目的</h3>
<p>在CentOS上配置用于开发的Web环境，包含Apache, PHP, Mysql。</p>
<h3>安装Apache</h3>
<p>直接通过yum安装Apache，<code>yum -y install httpd</code></p>
<p>安装好后，默认情况下， Apache 的配置文件 <code>httpd.conf</code> 文件在 <code>/etc/httpd/conf/httpd.conf</code> 位置，编辑配置文件，修改<code>DocumentRoot</code>、<code>Directory</code> 两处设置为你需要保存网站文件的位置。</p>
<h3>安装Mysql</h3>
<p>直接通过yum安装Mysql，<code>yum -y install mysql</code></p>
<h3>安装PHP</h3>
<p>由于CentOS通过yum安装的PHP为5.1版本，我需要5.2.17版本来保证和线上的运行环境一致，所以自己下载PHP源码进行编译安装。</p>
<ol>
<li>到 <a href="http://php.net">http://php.net</a> 下载对应版本的源码到 <code>/tmp/</code> 目录并解压。</li>
<li>进入解压后的目录 <code>/tmp/php-5.2.17/</code> </li>
<li>根据需求配置需要的模块 <code>./configure --enable-mbstring --with-curl --with-gd --with-mcrypt --with-mysql --with-mysqli --with-apxs2=/usr/sbin/apxs</code></li>
<li>make</li>
<li>make install</li>
</ol>
<p>上面的语句肯定不会执行成功，因为缺少一大堆的依赖文件，<q>configure: error: libpng.(a|so) not found.</q> 当遇到这种提示时，需要安装libpng库，除此之外还需要安装开发包。<code>yum -y install libpng libpng-devel</code>，对于其它的依赖支持也同样处理。</p>
<p>上面的参数 &#8211;with-apxs2=url 可以让 PHP 找到 Apache 的配置详情，然后自动添加 Apache 支持。同样如果没有安装 httpd-devel，编译PHP的时候是找不到 apxs 的路径的。</p>
<p>好了，以上的配置安装都成功了后，现在写一个phpinfo()的php文件，然后访问 http://localhost 应该就可以看到 phpinfo 页面了。</p>
<p>如果看到的是PHP代码，到Apache的配置文件 httpd.conf 里加上PHP文件类型：<code>AddType application/x-httpd-php .php</code>。</p>
<p>
在 phpinfo 页面可以看到PHP配置文件的目录和加载的配置文件。<br />
<code>Loaded Configuration File</code> （已加载的配置文件）<br />
<code>Configuration File (php.ini) Path</code> （配置文件所在的目录）<br />
如果值为空则表示没有配置文件，需要更改PHP的配置的话，可以从php源码目录里将 php.ini-recommended 拷贝并重命名为 php.ini 到 <code>Configuration File (php.ini) Path</code> 指定的那个目录，然后进行修改。</p>
<p>如果发现编译安装好后又需要添加某个PHP插件？</p>
<ol>
<li>进入PHP源码目录</li>
<li>make clean</li>
<li>./configure 在原有的参数基础上再加上新加的参数</li>
<li>make</li>
<li>make install</li>
</ol>
<h3>其它相关配置</h3>
<p>/etc/my.cnf 配置mysql参数，有的话不需要重复添加</p>
<pre>
[mysqld] #应该有这句了
default-character-set = utf8 #默认编码utf8
[mysql] ＃应该有这句，没有则添加上
default-character-set = utf8 #默认编码utf8</pre>
<p>
设置Mysql随系统启动<br />
<code>chkconfig mysqld on</code> 随系统启动，通过 <code>chkconfig --list mysqld</code> 检验状态，2－5为on就OK<br />
<code>/etc/rc.d/init.d/mysqld start</code> 启动mysql
</p>
<p>
一些 Mysql 语句：<br />
show databases; 查看存在的数据库<br />
use test; 连接使用数据库test<br />
show tables; 查看数据库里的表<br />
drop table test; 删除test表<br />
drop database test; 删除某个数据库<br />
delete from mysql.user where user=”; 删除匿名用户<br />
set password for root@localhost=password(&#8216;密码&#8217;) 设置root密码<br />
grant all privileges on test.* test@localhost identified by &#8216;密码&#8217; 建立对test数据库有完全操作权限的名为test的用户;<br />
revoke all privileges on *.* from test@localhost; 取消test对数据库的操作权限<br />
flush privileges; 刷新使生效<br />
注意到了上面的语句中的用户都是test@localhost吧，表示该用户只能在localhost访问数据库<br />
如果远程访问数据库，需要设置将host改为%; 或者通过GRANT语句另外授权帐号
</p>
<p>
一些PHP配置参数参考，也可以通过查看 <code>./configure</code> 文件了解详细参数配置<br />
./configure <br />
–prefix=/usr/local/php                      php 安装目录<br />
–with-apxs2=/usr/local/apache/bin/apxs<br />
–with-config-file-path=/usr/local/php/etc      指定php.ini位置<br />
–with-mysql=/usr/local/mysql           mysql安装目录，对mysql的支持<br />
–with-mysqli=/usr/local/mysql/bin/mysql_config    mysqli文件目录,优化支持<br />
–enable-safe-mode                              打开安全模式<br />
–enable-ftp                                 打开ftp的支持<br />
–enable-zip                                 打开对zip的支持<br />
–with-bz2                    打开对bz2文件的支持<br />
–with-jpeg-dir                                 打开对jpeg图片的支持<br />
–with-png-dir                                 打开对png图片的支持<br />
–with-freetype-dir              打开对freetype字体库的支持<br />
–without-iconv                关闭iconv函数，种字符集间的转换<br />
–with-libxml-dir                 打开libxml2库的支持<br />
–with-xmlrpc              打开xml-rpc的c语言<br />
–with-zlib-dir                                 打开zlib库的支持<br />
–with-gd                                    打开gd库的支持<br />
–enable-gd-native-ttf               支持TrueType字符串函数库<br />
–with-curl                      打开curl浏览工具的支持<br />
–with-curlwrappers                 运用curl工具打开url流<br />
–with-ttf                      打开freetype1.*的支持，可以不加了<br />
–with-xsl            打开XSLT 文件支持，扩展了libxml2库 ，需要libxslt软件<br />
–with-gettext                      打开gnu 的gettext 支持，编码库用到<br />
–with-pear            打开pear命令的支持，php扩展用的<br />
–enable-calendar             打开日历扩展功能<br />
–enable-mbstring                  多字节，字符串的支持<br />
–enable-bcmath                  打开图片大小调整,用到zabbix监控的时候用到了这个模块<br />
–enable-sockets                  打开 sockets 支持<br />
–enable-exif                      图片的元数据支持<br />
–enable-magic-quotes               魔术引用的支持<br />
–disable-rpath                     关闭额外的运行库文件<br />
–disable-debug                  关闭调试模式<br />
–with-mime-magic=/usr/share/file/magic.mime      魔术头文件位置<br />
cgi方式安装才用的参数<br />
–enable-fpm                     打上php-fpm 补丁后才有这个参数，cgi方式安装的启动程序<br />
–enable-fastcgi                  支持fastcgi方式启动php<br />
–enable-force-cgi-redirect             同上 ,帮助里没有解释<br />
–with-ncurses                     支持ncurses 屏幕绘制以及基于文本终端的图形互动功能的动态库<br />
–enable-pcntl           freeTDS需要用到的，可能是链接mssql 才用到<br />
mhash和mcrypt算法的扩展<br />
–with-mcrypt                     算法<br />
–with-mhash                     算法<br />
–with-openssl           openssl的支持，加密传输时用到的<br />
–with-pcre-dir=/usr/local/bin/pcre-config    perl的正则库案安装位置</p>
]]></content:encoded>
			<wfw:commentRss>http://foxling.org/develop/lamp-centos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>触发器设计技巧与实例</title>
		<link>http://foxling.org/develop/sql-trigger/</link>
		<comments>http://foxling.org/develop/sql-trigger/#comments</comments>
		<pubDate>Tue, 12 Aug 2008 22:28:10 +0000</pubDate>
		<dc:creator>FoxLing</dc:creator>
				<category><![CDATA[开发]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[trigger]]></category>

		<guid isPermaLink="false">http://wp.foxling.cn/as-flex-air/3/</guid>
		<description><![CDATA[　　在数据库设计中，有两种方法可设定自动化的资料处理规则，一种是条件约束，一种是触发器,一般而言，条件约束比触发器较容易设定及维护，且执行效率较好，但条件约束只能对资料进行简单的栏位检核，当涉及到多表操作等复杂操作时，就要用到触发器了。 　　一个数据库系统中有两个虚拟表用于存储在表中记录改动的信息，分别是： 虚拟表Ins&#101;rted 虚拟表Del&#101;ted 在表记录新增时 存放新增的记录 不存储记录 修改时 存放用来更新的新记录 存放更新前的记录 删除时 不存储记录 存放被删除的记录 触发器的种类及触发时机 After触发器：触发时机在资料已变动完成后，它将对变动资料进行必要的善后与处理，若发现有错误，则用事务回滚（Rollback Transaction)将此次操作所更动的资料全部回复。 Istead of 触发器：触发时机在资料变动前发生，且资料如何变动取决于触发器现在介绍一下创建触发器的编写格式： After类型: Cr&#101;ate Trigger 触发器名称 on 表名 after 操作(ins&#101;rt,up&#100;ate) as Sql语句 Instead类型 Cr&#101;ate Trigger 触发器名称 on 表名 Instead of 操作(up&#100;ate,del&#101;te) as Sql语句 实例1: 　　在订单(表orders)中的订购数量(列名为num)有变动时，触发器会先到客户(表Customer)中 取得该用户的信用等级(列名为Level),然后再到信用额度(Creit)中取出该等级 许可的订购数量上下限，最后比较订单中的订购数量是否符合限制。 代码： Cr&#101;ate Trigger num_check on o&#114;ders after ins&#101;rt,up&#100;ate as if up&#100;ate(num) [...]]]></description>
			<content:encoded><![CDATA[<p>　　在数据库设计中，有两种方法可设定自动化的资料处理规则，一种是条件约束，一种是触发器,一般而言，条件约束比触发器较容易设定及维护，且执行效率较好，但条件约束只能对资料进行简单的栏位检核，当涉及到多表操作等复杂操作时，就要用到触发器了。<br />
　　一个数据库系统中有两个虚拟表用于存储在表中记录改动的信息，分别是：<br />
    虚拟表Ins&#101;rted                    虚拟表Del&#101;ted</p>
<p>在表记录新增时   存放新增的记录                        不存储记录<br />
        修改时   存放用来更新的新记录                  存放更新前的记录<br />
        删除时   不存储记录                            存放被删除的记录</p>
<p>触发器的种类及触发时机<br />
After触发器：触发时机在资料已变动完成后，它将对变动资料进行必要的善后与处理，若发现有错误，则用事务回滚（Rollback Transaction)将此次操作所更动的资料全部回复。<br />
Istead of 触发器：触发时机在资料变动前发生，且资料如何变动取决于触发器现在介绍一下创建触发器的编写格式：</p>
<p>After类型:<br />
Cr&#101;ate Trigger  触发器名称<br />
on 表名<br />
after 操作(ins&#101;rt,up&#100;ate)<br />
as<br />
    Sql语句</p>
<p>Instead类型<br />
Cr&#101;ate Trigger 触发器名称<br />
on 表名<br />
Instead of 操作(up&#100;ate,del&#101;te)<br />
as<br />
Sql语句</p>
<p>实例1:<br />
　　在订单(表orders)中的订购数量(列名为num)有变动时，触发器会先到客户(表Customer)中<br />
取得该用户的信用等级(列名为Level),然后再到信用额度(Creit)中取出该等级<br />
许可的订购数量上下限，最后比较订单中的订购数量是否符合限制。</p>
<p>代码：<br />
Cr&#101;ate  Trigger num_check<br />
on o&#114;ders<br />
after ins&#101;rt,up&#100;ate<br />
as<br />
if up&#100;ate(num)<br />
    begin<br />
    if exists(sel&#101;ct a.* from o&#114;ders a join customer b on a.customerid=b.customerid<br />
    join creit c on b.level=c.level<br />
    wh&#101;re a.num between c.up and c.down)<br />
        begin<br />
        rollback transaction<br />
        exec master..xp_sendmail &#39;administrator&#39;,&#39;客户的订购数量不符合限制&#39;<br />
        end<br />
    end</p>
<p>实例2:<br />
有工资管理系统中，当公司对某员工甲的月薪进行调整时，通常会先在表员工中修改薪资列,然后在表员工记录中修改薪资调整时间与薪资</p>
<p>Cr&#101;ate trigger compensation<br />
on 员工<br />
after up&#100;ate<br />
as<br />
    if @@rowcount=0 return<br />
    if up&#100;ate(薪资)<br />
    begin<br />
        ins&#101;rt 员工记录<br />
     sel&#101;ct 员工遍号,薪资,getdate()<br />
        from ins&#101;rted<br />
    end</p>
]]></content:encoded>
			<wfw:commentRss>http://foxling.org/develop/sql-trigger/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Response.ContentType的类型小集  [MIME]</title>
		<link>http://foxling.org/develop/response-contenttype-mime/</link>
		<comments>http://foxling.org/develop/response-contenttype-mime/#comments</comments>
		<pubDate>Wed, 23 Apr 2008 03:03:28 +0000</pubDate>
		<dc:creator>FoxLing</dc:creator>
				<category><![CDATA[开发]]></category>
		<category><![CDATA[ContentType]]></category>
		<category><![CDATA[MIME类型]]></category>
		<category><![CDATA[Response]]></category>

		<guid isPermaLink="false">http://wp.foxling.cn/as-flex-air/13/</guid>
		<description><![CDATA[ez=application/andrew-inset hqx=application/mac-binhex40 cpt=application/mac-compactpro doc=application/msword bin=application/octet-stream dms=application/octet-stream lha=application/octet-stream lzh=application/octet-stream exe=application/octet-stream class=application/octet-stream so=application/octet-stream dll=application/octet-stream oda=application/oda pdf=application/pdf ai=application/postscript eps=application/postscript ps=application/postscript smi=application/smil smil=application/smil mif=application/vnd.mif xls=application/vnd.ms-excel ppt=application/vnd.ms-powerpoint wbxml=application/vnd.wap.wbxml wmlc=application/vnd.wap.wmlc wmlsc=application/vnd.wap.wmlscriptc bcpio=application/x-bcpio vcd=application/x-cdlink pgn=application/x-chess-pgn cpio=application/x-cpio csh=application/x-csh dcr=application/x-director dir=application/x-director dxr=application/x-director dvi=application/x-dvi spl=application/x-futuresplash gtar=application/x-gtar hdf=application/x-hdf js=application/x-javascript skp=application/x-koan skd=application/x-koan skt=application/x-koan skm=application/x-koan latex=application/x-latex nc=application/x-netcdf cdf=application/x-netcdf sh=application/x-sh shar=application/x-shar swf=application/x-shockwave-flash sit=application/x-stuffit sv4cpio=application/x-sv4cpio sv4crc=application/x-sv4crc tar=application/x-tar tcl=application/x-tcl tex=application/x-tex texinfo=application/x-texinfo [...]]]></description>
			<content:encoded><![CDATA[<p>ez=application/andrew-inset<br />
hqx=application/mac-binhex40<br />
cpt=application/mac-compactpro<br />
doc=application/msword<br />
bin=application/octet-stream<br />
dms=application/octet-stream<br />
lha=application/octet-stream<br />
lzh=application/octet-stream<br />
exe=application/octet-stream<br />
class=application/octet-stream<br />
so=application/octet-stream<br />
dll=application/octet-stream<br />
oda=application/oda<br />
pdf=application/pdf<br />
ai=application/postscript<br />
eps=application/postscript<br />
ps=application/postscript<br />
smi=application/smil<br />
smil=application/smil<br />
mif=application/vnd.mif<br />
xls=application/vnd.ms-excel<br />
ppt=application/vnd.ms-powerpoint<br />
wbxml=application/vnd.wap.wbxml<br />
wmlc=application/vnd.wap.wmlc<br />
wmlsc=application/vnd.wap.wmlscriptc<br />
bcpio=application/x-bcpio<br />
vcd=application/x-cdlink<br />
pgn=application/x-chess-pgn<br />
cpio=application/x-cpio<br />
csh=application/x-csh<br />
dcr=application/x-director<br />
dir=application/x-director<br />
dxr=application/x-director<br />
dvi=application/x-dvi<br />
spl=application/x-futuresplash<br />
gtar=application/x-gtar<br />
hdf=application/x-hdf<br />
js=application/x-javascript<br />
skp=application/x-koan<br />
skd=application/x-koan<br />
skt=application/x-koan<br />
skm=application/x-koan<br />
latex=application/x-latex<br />
nc=application/x-netcdf<br />
cdf=application/x-netcdf<br />
sh=application/x-sh<br />
shar=application/x-shar<br />
swf=application/x-shockwave-flash<br />
sit=application/x-stuffit<br />
sv4cpio=application/x-sv4cpio<br />
sv4crc=application/x-sv4crc<br />
tar=application/x-tar<br />
tcl=application/x-tcl<br />
tex=application/x-tex<br />
texinfo=application/x-texinfo<br />
texi=application/x-texinfo<br />
t=application/x-troff<br />
tr=application/x-troff<br />
roff=application/x-troff<br />
man=application/x-troff-man<br />
me=application/x-troff-me<br />
ms=application/x-troff-ms<br />
ustar=application/x-ustar<br />
src=application/x-wais-source<br />
xhtml=application/xhtml+xml<br />
xht=application/xhtml+xml<br />
zip=application/zip<br />
au=audio/basic<br />
snd=audio/basic<br />
mid=audio/midi<br />
midi=audio/midi<br />
kar=audio/midi<br />
mpga=audio/mpeg<br />
mp2=audio/mpeg<br />
mp3=audio/mpeg<br />
aif=audio/x-aiff<br />
aiff=audio/x-aiff<br />
aifc=audio/x-aiff<br />
m3u=audio/x-mpegurl<br />
ram=audio/x-pn-realaudio<br />
rm=audio/x-pn-realaudio<br />
rpm=audio/x-pn-realaudio-plugin<br />
ra=audio/x-realaudio<br />
wav=audio/x-wav<br />
pdb=chemical/x-pdb<br />
xyz=chemical/x-xyz<br />
bmp=image/bmp<br />
gif=image/gif<br />
ief=image/ief<br />
jpeg=image/jpeg<br />
jpg=image/jpeg<br />
jpe=image/jpeg<br />
png=image/png<br />
tiff=image/tiff<br />
tif=image/tiff<br />
djvu=image/vnd.djvu<br />
djv=image/vnd.djvu<br />
wbmp=image/vnd.wap.wbmp<br />
ras=image/x-cmu-raster<br />
pnm=image/x-portable-anymap<br />
pbm=image/x-portable-bitmap<br />
pgm=image/x-portable-graymap<br />
ppm=image/x-portable-pixmap<br />
rgb=image/x-rgb<br />
xbm=image/x-xbitmap<br />
xpm=image/x-xpixmap<br />
xwd=image/x-xwindowdump<br />
igs=model/iges<br />
iges=model/iges<br />
msh=model/mesh<br />
mesh=model/mesh<br />
silo=model/mesh<br />
wrl=model/vrml<br />
vrml=model/vrml<br />
css=text/css<br />
html=text/html<br />
htm=text/html<br />
asc=text/plain<br />
txt=text/plain<br />
rtx=text/richtext<br />
rtf=text/rtf<br />
sgml=text/sgml<br />
sgm=text/sgml<br />
tsv=text/tab-separated-values<br />
wml=text/vnd.wap.wml<br />
wmls=text/vnd.wap.wmlscript<br />
etx=text/x-setext<br />
xsl=text/xml<br />
xml=text/xml<br />
mpeg=video/mpeg<br />
mpg=video/mpeg<br />
mpe=video/mpeg<br />
qt=video/quicktime<br />
mov=video/quicktime<br />
mxu=video/vnd.mpegurl<br />
avi=video/x-msvideo<br />
movie=video/x-sgi-movie<br />
ice=x-conference/x-cooltalk</p>
]]></content:encoded>
			<wfw:commentRss>http://foxling.org/develop/response-contenttype-mime/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>关于byval</title>
		<link>http://foxling.org/uncategorized/vb-asp-byval/</link>
		<comments>http://foxling.org/uncategorized/vb-asp-byval/#comments</comments>
		<pubDate>Sat, 12 Apr 2008 21:47:27 +0000</pubDate>
		<dc:creator>FoxLing</dc:creator>
				<category><![CDATA[开发]]></category>
		<category><![CDATA[未分类]]></category>
		<category><![CDATA[ASP]]></category>
		<category><![CDATA[byval]]></category>
		<category><![CDATA[VB]]></category>

		<guid isPermaLink="false">http://wp.foxling.cn/as-flex-air/1/</guid>
		<description><![CDATA[为什么一个结果是0，一个是10？ 第一段： Private Sub Form_Click() Dim a As Integer For i = 1 To 10 Call abcd(a) Next i Print a End Sub Sub abcd(ByVal x) x = x + 1 End Sub 第二段： Private Sub Form_Click() Dim a As Integer For i = 1 To 10 Call abcd(a) Next i Print a End Sub [...]]]></description>
			<content:encoded><![CDATA[<p>为什么一个结果是0，一个是10？<br />
第一段：</p>
<pre>
<code>Private Sub Form_Click()
    Dim a As Integer
    For i = 1 To 10
        Call abcd(a)
    Next i
    Print a
End Sub

Sub abcd(ByVal x)
    x = x + 1
End Sub</code>
</pre>
<p>第二段：</p>
<pre>
<code>
Private Sub Form_Click()
    Dim a As Integer
    For i = 1 To 10
        Call abcd(a)
    Next i
    Print a
End Sub

Sub abcd(x)
    x = x + 1
End Sub
</code>
</pre>
<p>byval是把内存数值的拷贝给程序，所以改变的只是拷贝，内存原来的值是不会改变的。<br />
第一个a的值并没有变化。</p>
]]></content:encoded>
			<wfw:commentRss>http://foxling.org/uncategorized/vb-asp-byval/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL存储过程部分参数</title>
		<link>http://foxling.org/develop/2/</link>
		<comments>http://foxling.org/develop/2/#comments</comments>
		<pubDate>Wed, 02 Apr 2008 12:19:29 +0000</pubDate>
		<dc:creator>FoxLing</dc:creator>
				<category><![CDATA[开发]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[参数]]></category>
		<category><![CDATA[存储过程]]></category>

		<guid isPermaLink="false">http://wp.foxling.cn/as-flex-air/2/</guid>
		<description><![CDATA[参数值的类型的意义如下： 名称值 整数值 功能 addbtimestamp 135 日期时间数据类型 addecimal 14 十进制整数值 addouble 5 双精度小数值 aderror 10 系统错误信息 adguid 72 全域性唯一识别字(globallyuniqueidentifier) addispath 9 com/ole自动对象(automationobject) adinteger 3 4字节有符号整数 adiunknown 13 com/ole对象 adlongvarbinary 205 大型２字节值 adlongvarchar 201 大型字符串值 adlongvarwchar 203 大型未编码字符串 adnumeric 131 十进制整数值 adsingle 4 单精度浮点小数 adsmallint 2 2字节有符号整数 adtinyint 16 1字节有符号整数 adunsignedbigint 21 8字节无符号整数 adunsignedint 19 4字节无符号整数 [...]]]></description>
			<content:encoded><![CDATA[<p>参数值的类型的意义如下：</p>
<table align="center">
<tr>
<th>名称值</th>
<th>整数值</th>
<th>功能</th>
</tr>
<tr>
<td>addbtimestamp</td>
<td>135</td>
<td>日期时间数据类型</td>
</tr>
<tr>
<td>addecimal</td>
<td>14</td>
<td>十进制整数值</td>
</tr>
<tr>
<td>addouble</td>
<td>5</td>
<td>双精度小数值</td>
</tr>
<tr>
<td>aderror</td>
<td>10</td>
<td>系统错误信息</td>
</tr>
<tr>
<td>adguid</td>
<td>72</td>
<td>全域性唯一识别字(globallyuniqueidentifier)</td>
</tr>
<tr>
<td>addispath</td>
<td>9</td>
<td>com/ole自动对象(automationobject)</td>
</tr>
<tr>
<td>adinteger</td>
<td>3</td>
<td>4字节有符号整数</td>
</tr>
<tr>
<td>adiunknown</td>
<td>13</td>
<td>com/ole对象</td>
</tr>
<tr>
<td>adlongvarbinary</td>
<td>205</td>
<td>大型２字节值</td>
</tr>
<tr>
<td>adlongvarchar</td>
<td>201</td>
<td>大型字符串值</td>
</tr>
<tr>
<td>adlongvarwchar</td>
<td>203</td>
<td>大型未编码字符串</td>
</tr>
<tr>
<td>adnumeric</td>
<td>131</td>
<td>十进制整数值</td>
</tr>
<tr>
<td>adsingle</td>
<td>4</td>
<td>单精度浮点小数</td>
</tr>
<tr>
<td>adsmallint</td>
<td>2</td>
<td>2字节有符号整数</td>
</tr>
<tr>
<td>adtinyint</td>
<td>16</td>
<td>1字节有符号整数</td>
</tr>
<tr>
<td>adunsignedbigint</td>
<td>21
<td>8字节无符号整数</td>
</tr>
<tr>
<td>adunsignedint</td>
<td>19</td>
<td>4字节无符号整数</td>
</tr>
<tr>
<td>adunsignedsmallint</td>
<td>18</td>
<td>2字节无符号整数</td>
</tr>
<tr>
<td>adunsignedtinyint</td>
<td>17
<td>1字节无符号整数</td>
</tr>
<tr>
<td>aduserdefined</td>
<td>132</td>
<td>用户自定义数据类型</td>
</tr>
<tr>
<td>advariant</td>
<td>12</td>
<td>ole对象</td>
</tr>
<tr>
<td>advarbinary</td>
<td>204</td>
<td>双字节字符变量值</td>
</tr>
<tr>
<td>advarchar</td>
<td>200</td>
<td>字符变量值</td>
</tr>
<tr>
<td>advarchar</td>
<td>202</td>
<td>未编码字符串变量值</td>
</tr>
<tr>
<td>adwchar</td>
<td>130</td>
<td>未编码字符</td>
</tr>
</table>
<p>　<br />
方向值的意义如下：</p>
<table align="center">
<tr>
<th>名称值</th>
<th>整数值</th>
<th>功能</th>
</tr>
<tr>
<td>adparaminput</td>
<td>1</td>
<td>允许数据输入至该参数当中</td>
</tr>
<tr>
<td>adparamoutput</td>
<td>2</td>
<td>允许数据输出至该参数当中</td>
</tr>
<tr>
<td>adparaminputoutput</td>
<td>3</td>
<td>允许数据输入、输出至该参数当中</td>
</tr>
<tr>
<td>adparamreturnvalue</td>
<td>4</td>
<td>允许从一子程序中返回数据至该参数当中</td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://foxling.org/develop/2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

