<?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>康盛博客</title>
	<atom:link href="http://www.helpphp.cn/feed" rel="self" type="application/rss+xml" />
	<link>http://www.helpphp.cn</link>
	<description>基于WordPress的PHP教程</description>
	<lastBuildDate>Thu, 11 Mar 2010 03:03:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>查看mysql的版本的方法</title>
		<link>http://www.helpphp.cn/1206</link>
		<comments>http://www.helpphp.cn/1206#comments</comments>
		<pubDate>Thu, 11 Mar 2010 03:03:31 +0000</pubDate>
		<dc:creator>helpuser</dc:creator>
				<category><![CDATA[php mysql]]></category>
		<category><![CDATA[查看mysql的版本方法]]></category>

		<guid isPermaLink="false">http://www.helpphp.cn/?p=1206</guid>
		<description><![CDATA[在日常的mysql操作中，比如新建库，新建表，基本的增、删、改、查等，这些操作我们是必须熟悉的。今天就来看看，查看mysql的版本的方法的几种方法。
第一种：status
这种方法是在客户端下使用命令的方式来查看mysql的版本等信息，同时还包括当前的字符集、所占用的端口等情况，给出的结果比较的全面。
如：

mysql> status
&#8212;&#8212;&#8212;&#8212;&#8211;
E:\web\mysql\bin\mysql.exe  Ver 14.14 Distrib 5.4.3-beta, for Win32 (ia32)
Connection id:          1
SSL:                    Not in use
Using delimiter:        ;
Server version:   [...]]]></description>
			<content:encoded><![CDATA[<p>在日常的mysql操作中，比如新建库，新建表，基本的增、删、改、查等，这些操作我们是必须熟悉的。今天就来看看，查看mysql的版本的方法的几种方法。<br />
第一种：status<br />
这种方法是在客户端下使用命令的方式来查看mysql的版本等信息，同时还包括当前的字符集、所占用的端口等情况，给出的结果比较的全面。<br />
如：</p>
<div class="code-bg">
mysql> status<br />
&#8212;&#8212;&#8212;&#8212;&#8211;<br />
E:\web\mysql\bin\mysql.exe  Ver 14.14 Distrib 5.4.3-beta, for Win32 (ia32)</p>
<p>Connection id:          1<br />
SSL:                    Not in use<br />
Using delimiter:        ;<br />
Server version:         5.4.3-beta-community MySQL Community Server (GPL)<br />
Protocol version:       10<br />
Connection:             localhost via TCP/IP<br />
Client characterset:    latin1<br />
Server characterset:    latin1<br />
TCP port:               3306<br />
Uptime:                 1 min 14 sec</p>
<p>Threads: 1  Questions: 8  Slow queries: 0  Opens: 15  Flush tables: 1  Open tabl<br />
es: 8  Queries per second avg: 0.108
</p></div>
<p>第二种：select version();<br />
和第一种方法一样，在命令行下使用mysql自带的函数来查询当前的版本信息，如下：</p>
<div class="code-bg">
mysql> select version();<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+<br />
| version()            |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+<br />
| 5.4.3-beta-community |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+<br />
1 row in set (0.01 sec)
</div>
<p>我想应该还有其它的方法来查看当前mysql的版本，但是这两种是比较方便和常用的。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.helpphp.cn/1206/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>php HTTP_Upload处理文件上传</title>
		<link>http://www.helpphp.cn/1197</link>
		<comments>http://www.helpphp.cn/1197#comments</comments>
		<pubDate>Wed, 10 Mar 2010 01:11:23 +0000</pubDate>
		<dc:creator>helpuser</dc:creator>
				<category><![CDATA[基于wordpress的PHP教程]]></category>
		<category><![CDATA[php HTTP_Upload]]></category>
		<category><![CDATA[安装php HTTP_Upload]]></category>

		<guid isPermaLink="false">http://www.helpphp.cn/?p=1197</guid>
		<description><![CDATA[对于php编程来说，PEAR可以说是一个软件库，下面本人就试用使用HTTP_Upload来处理文件上传。在上一节的基础之上，我们使用了$_FILES这个全局全量来处理通过表单上传的文件，但是对于这个常用的编程操作，我们是否有更加强大的方式呢？比如在文件上传的过程中，所发生的错误，我们是否可以使用统一的方式来显示从而更加人性化呢？我们是否可以使用面向对象的特性来封装这些处理细节从而让代码更加的简洁和易于理解呢？这一切就交给HTTP_Upload吧？
安装HTTP_Upload
HTTP_Upload是PEAR中的一个库，所以我们要使用HTTP_Upload，就得安装它：
请参阅安装phpDocumentor的方法在安装了pear之后，我们可以使用以下的方法来安装HTTP_Upload：

pear install HTTP_Upload
downloading HTTP_Upload-0.9.1.tgz &#8230;
Starting to download HTTP_Upload-0.9.1.tgz (9,460 bytes)
&#8230;..done: 9,460 bytes
install ok: channel://pear.php.net/HTTP_Upload-0.9.1

在执行pear install HTTP_Upload后，我们应该可以顺利的成功！查看安装结果:pear list,如图：

添加路径:
在php.ini中查找include_path,添加到php的搜索路径中，如图：

重启apache,这样你的HTTP_Upload就可以正确的被包含进来，不会在require(&#8217;HTTP/Upload.php&#8217;)时出错。
下面就来看看，它的功能吧，如下代码所示：

&#60;?php
 require(&#8217;HTTP/Upload.php&#8217;);
 $upload=new HTTP_Upload();
 $filename=$upload-&#62;getFiles(&#8217;file&#8217;);
 if($filename-&#62;isValid()){
 $filename-&#62;moveTo(&#8217;upload&#8217;);
 echo &#8220;文件上传成功&#8221;;
 }else{
 echo $filename-&#62;errorMsg();
 }
?&#62;
&#60;html&#62;
&#60;body&#62;
&#60;form action=&#8221;&#60;?php echo $_SERVER['PHP_SELF']; ?&#62;&#8221; method=&#8221;post&#8221; enctype=&#8221;multipart/form-data&#8221;&#62;
&#60;label for=&#8221;file&#8221;&#62;文件名:&#60;/label&#62;
&#60;input type=&#8221;file&#8221; name=&#8221;file&#8221; id=&#8221;file&#8221; /&#62;
&#60;br /&#62;
&#60;input type=&#8221;submit&#8221; name=&#8221;submit&#8221; value=&#8221;提交&#8221; /&#62;
&#60;/form&#62;
&#60;/body&#62;
&#60;/html&#62;

我们唯一使用的就是getFiles(&#8217;file&#8217;)中的file，这个file就是表单中的name:&#60;input type=&#8221;file&#8221; name=&#8221;file&#8221; id=&#8221;file&#8221; /&#62;,一切就是这样的简单。如果你要使用HTTP_Upload上传多个文件，可以new多个对象然后像上面这样处理就可以了。
关于HTTP_Upload的中方法，请自己查看它的源代码。文件位置：PEAR\HTTP。
]]></description>
			<content:encoded><![CDATA[<p>对于php编程来说，PEAR可以说是一个软件库，下面本人就试用使用HTTP_Upload来处理文件上传。在上一节的基础之上，我们使用了$_FILES这个全局全量来处理通过表单上传的文件，但是对于这个常用的编程操作，我们是否有更加强大的方式呢？比如在文件上传的过程中，所发生的错误，我们是否可以使用统一的方式来显示从而更加人性化呢？我们是否可以使用面向对象的特性来封装这些处理细节从而让代码更加的简洁和易于理解呢？这一切就交给HTTP_Upload吧？</p>
<p><strong>安装HTTP_Upload</strong><br />
HTTP_Upload是PEAR中的一个库，所以我们要使用HTTP_Upload，就得安装它：<br />
请参阅<a href="http://www.helpphp.cn/635">安装phpDocumentor</a>的方法在安装了pear之后，我们可以使用以下的方法来安装HTTP_Upload：</p>
<div class="code-bg">
pear install HTTP_Upload<br />
downloading HTTP_Upload-0.9.1.tgz &#8230;<br />
Starting to download HTTP_Upload-0.9.1.tgz (9,460 bytes)<br />
&#8230;..done: 9,460 bytes<br />
install ok: channel://pear.php.net/HTTP_Upload-0.9.1
</div>
<p>在执行pear install HTTP_Upload后，我们应该可以顺利的成功！查看安装结果:pear list,如图：<br />
<a href="http://www.helpphp.cn/wp-content/uploads/2010/03/upload-http.jpg"><img src="http://www.helpphp.cn/wp-content/uploads/2010/03/upload-http.jpg" alt="upload-http" title="upload-http" width="452" height="309" class="wp-image-1199" /></a><br />
添加路径:<br />
在php.ini中查找include_path,添加到php的搜索路径中，如图：<br />
<a href="http://www.helpphp.cn/wp-content/uploads/2010/03/include-path.jpg"><img src="http://www.helpphp.cn/wp-content/uploads/2010/03/include-path.jpg" alt="include-path" title="include-path" width="629" height="88" class="wp-image-1198" /></a><br />
重启apache,这样你的HTTP_Upload就可以正确的被包含进来，不会在require(&#8217;HTTP/Upload.php&#8217;)时出错。</p>
<p>下面就来看看，它的功能吧，如下代码所示：</p>
<div class="code-bg">
&lt;?php<br />
 require(&#8217;HTTP/Upload.php&#8217;);<br />
 $upload=new HTTP_Upload();<br />
 $filename=$upload-&gt;getFiles(&#8217;file&#8217;);<br />
 if($filename-&gt;isValid()){<br />
 $filename-&gt;moveTo(&#8217;upload&#8217;);<br />
 echo &#8220;文件上传成功&#8221;;<br />
 }else{<br />
 echo $filename-&gt;errorMsg();<br />
 }<br />
?&gt;<br />
&lt;html&gt;<br />
&lt;body&gt;<br />
&lt;form action=&#8221;&lt;?php echo $_SERVER['PHP_SELF']; ?&gt;&#8221; method=&#8221;post&#8221; enctype=&#8221;multipart/form-data&#8221;&gt;<br />
&lt;label for=&#8221;file&#8221;&gt;文件名:&lt;/label&gt;<br />
&lt;input type=&#8221;file&#8221; name=&#8221;file&#8221; id=&#8221;file&#8221; /&gt;<br />
&lt;br /&gt;<br />
&lt;input type=&#8221;submit&#8221; name=&#8221;submit&#8221; value=&#8221;提交&#8221; /&gt;<br />
&lt;/form&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;
</div>
<p>我们唯一使用的就是getFiles(&#8217;file&#8217;)中的file，这个file就是表单中的name:&lt;input type=&#8221;file&#8221; name=&#8221;file&#8221; id=&#8221;file&#8221; /&gt;,一切就是这样的简单。如果你要使用HTTP_Upload上传多个文件，可以new多个对象然后像上面这样处理就可以了。</p>
<p>关于HTTP_Upload的中方法，请自己查看它的源代码。文件位置：PEAR\HTTP。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.helpphp.cn/1197/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
